1. *** New version of B4J is available ***
    B4J v7.8
    Dismiss Notice

Android Question [Solved] CLV, Tables, Get Data

Discussion in 'Android Questions' started by mw71, Jun 19, 2019.

  1. mw71

    mw71 Active Member Licensed User


    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/

    Attached Files:

  2. Erel

    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:
    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:
    Dim tbl As Table = clv.GetValue(i)
  3. mw71

    mw71 Active Member Licensed User

    Erel, Thank you

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

    also i have change to the internal Libary.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice