B4J Question how get page counts in B4xtable

Discussion in 'B4J Questions' started by behnam_tr, Aug 9, 2019.

  1. behnam_tr

    behnam_tr Member

    how can i get all page counts in b4xtable ??
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    What do you mean with page counts?
     
  3. behnam_tr

    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
     
  4. Erel

    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:
    Code:
    If B4XTable1.mCurrentCount > 0 Then
       
    Dim NumberOfPages As Int = Ceil(B4XTable1.mCurrentCount / B4XTable1.VisibleRowIds.Size)
       
    Log(NumberOfPages)
    End If
     
    Johan Hormaza, jimmyF and behnam_tr like this.
Loading...
  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