Android Question [Solved] CLV, Tables, Get Data

mw71

Active Member
Licensed User
Hi,

i have a CustomListView 1). Each Panel hold a Table 2).
The User can select diffrent Lines on Table. With press on the Button1 (right down corner) i will get the (Data from the) selected Rows (from all Tables on all Panels from CLV).

At the moment i get only the Data from the last Table (on the last Panel).

Test Project is attached.


1) https://www.b4x.com/android/forum/t...g-or-collapsing-xcustomlistview-items.106148/
2)https://www.b4x.com/android/forum/threads/class-flexible-table.30649/
 

Attachments

Erel

Administrator
Staff member
Licensed User
1. You are not using CLVExpandable. CLVExpandable is a class that extends xCustomListView library.
2. Table1 will point to the last table added.

Change your code to:
B4X:
clv1.Add(CreateItem(Colors.Cyan, "Item #" & i,"citylist_" & i & ".csv"), Table1)
Don't use Table1 in your code.
Get the correct item with CLV.GetItemFromView. Get the table with:
B4X:
Dim tbl As Table = clv.GetValue(i)
 

mw71

Active Member
Licensed User
Erel, Thank you

i have Change. With
B4X:
    For i = 0 To clv1.GetSize - 1
        Dim tbl As Table = clv1.GetValue(i)
        Log("Panel " & i & ", Size: " & tbl.SelectedRows.Size)
    Next
(and set the Value to Table) it works as expected.

also i have change to the internal Libary.
 
Top