B4J Question how get page counts in B4xtable

behnam_tr

Member
when i have more data
maybe i had 2 or 3 page in b4xtable
i want to know page count
for example i can get or set currentpage with b4xtable1.currentpage
but i dont know how many pages i have
 

Erel

Administrator
Staff member
Licensed User
Note that the number of pages is not always known. It will be unknown when there is a search term.
You can put this code in DataUpdated event to calculate the number of pages:
B4X:
If B4XTable1.mCurrentCount > 0 Then
   Dim NumberOfPages As Int = Ceil(B4XTable1.mCurrentCount / B4XTable1.VisibleRowIds.Size)
   Log(NumberOfPages)
End If
 
Top