Android Question Unselecting a row - Table

Eric McDonald

Member
Licensed User
I am using the Table Library. I know there have been many improvements with the B4XTable and Flexible table, however (so far) this has worked perfectly fine. In my program, I am essentially using an integer to keep track of removes/additions/selections in my Main class. When I remove from the table, I always remove the selected row. However, if no row is selected, I treat it like a queue, removing the oldest entry (FIFO). Then, I set my integer to 0.

I came across a problem however. I am missing the logic to keep track of my queue using my integer when a row is selected, then deselected (clicked, then clicked again). For the life of me, I cannot find the logic in the Table class where a row is deselected. I know the solution, I'll just make my variable a global and set it equal to zero where this happens. I just need to know where to put the operation.

Any help would be greatly appreciated. Thanks a ton!
 

mangojack

Well-Known Member
Licensed User
Some clarification please ..

Table Library ? , Which one are you using ... B4XTable or Flexible table.

If you are using the B4XTable , you would be handling the 'Row Selection / Row Highlighting' from the Cell_Click event.
B4X:
Sub B4XTable1_CellClicked (ColumnId As String, RowId As Long)

If this is the case , set another global tracking last row clicked using the RowId
In the Cell_Clicked event check If current clicked Rowid = flagLastRowClicked ... if yes then you know its a Deselect.
 
Upvote 0
Top