Android Question [Solved] CLV, Tables, Get Data

mw71

Active Member
Licensed User
Longtime 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

  • CLV_WithTable.zip
    47.8 KB · Views: 129

Erel

B4X founder
Staff member
Licensed User
Longtime 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)
 
Upvote 0

mw71

Active Member
Licensed User
Longtime 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.
 
Upvote 0
Top