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.
1667135094679.png



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

Attachments

  • B4XTableTest.zip
    2.8 KB · Views: 87
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: 85
  • Works.zip
    12.6 KB · Views: 85
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
Top