B4J Question B4XTable "go to last"

LucaMs

Expert
Licensed User
Longtime User
I fill a B4XTable with 100 "records" (I'm attaching a test project, in which they are not DB records), 10 records / page.
If I press ">", next page to the end, everything is ok and the navigation keys for subsequent records are correctly disabled.



If on the first "page" I press on "> |", last page, the B4XTable shows me an enon-existent eleventh page, with the hundredth "record".
 

Attachments

  • B4XTableTest.zip
    2.8 KB · Views: 161
Last edited:

teddybear

Well-Known Member
Licensed User
B4XTable lblLast_Click add mCurrentCount Mod mRowsPerPage = 0 test
B4X:
Private Sub lblLast_Click
    If lblLast.Tag = False Then Return
    If mCurrentCount Mod mRowsPerPage = 0 Then
        setFirstRowIndex(mCurrentCount - mRowsPerPage)
        Return
    End If
    setFirstRowIndex (Floor(mCurrentCount /  mRowsPerPage) * mRowsPerPage)
End Sub
 
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
I could not understand why the project (a test) attached to the first post and that I am attaching here, continues to not work as it should.
I also attach the same project but with the source of the B4XLib and this one works!
 

Attachments

  • NotWork.zip
    2.8 KB · Views: 156
  • Works.zip
    12.6 KB · Views: 163
Upvote 0

teddybear

Well-Known Member
Licensed User
I could not understand why the project (a test) attached to the first post and that I am attaching here, continues to not work as it should.
I also attach the same project but with the source of the B4XLib and this one works!
Maybe your internal b4xtable.b4xlib doesn't be updated.
I have tested 2 projects you posted, Both of them work, if you replace b4xtable.bas from works.zip in your b4xtable.b4xlib.
 
Last edited:
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…