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".
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
Private Sub lblLast_Click
If lblLast.Tag = False Then Return
Dim NumberOfPages As Int = Ceil(mCurrentCount / mRowsPerPage)
setFirstRowIndex ((NumberOfPages - 1) * mRowsPerPage)
End Sub
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!
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.