GridView with checkbox

ThePuiu

Active Member
Licensed User
Longtime User
I need a grid that can have a checkbox column type. Should allow checking of individual cells. There is something already made or I must emulated him with scrollview and labels?
Ty!
 

mangojack

Expert
Licensed User
Longtime User
Upvote 0

ThePuiu

Active Member
Licensed User
Longtime User
How do I determine which checkbox is checked? I must do this in a subroutine in a loop.

Ty!
 
Upvote 0

mangojack

Expert
Licensed User
Longtime User
Something like ..

B4X:
Sub btnGetChecked_Click
   
   Dim i , nChecks As Int
   
   'get the number of rows/checkboxes
   nChecks = clv1.GetSize
   
   'loop thru and get state of check boxes
   For  i = 0 To nChecks -1   
      Dim pnl As Panel
      pnl = clv1.GetPanel(i)
      
      Dim chk As CheckBox
      chk = pnl.GetView(2)
      
      If chk.Checked = True Then 
         Msgbox ("Checkbox Number " &(i +1) & "   is Checked ", "")
      End If            
   Next
      
End Sub

Edit .... Sorry removed one of the panels .. maybe have a look at this instead.


Cheers mj
 

Attachments

  • CustomListView2.zip
    9.6 KB · Views: 386
Last edited:
Upvote 0
Top