B4J Question Table Sorting

Nokia

Active Member
Licensed User
Longtime User
When I click on the columns in my tableview to sort. It never truly sorts correctly. Dates, number, currency and or words. With or without labels in the fields. Is there a way to correct this?
Sample attached.
 

Attachments

  • Screenshot 2025-06-06 103726.png
    Screenshot 2025-06-06 103726.png
    81.4 KB · Views: 100

Brian Dean

Well-Known Member
Licensed User
Longtime User
You have probably made an error. Start with this post - especially item 3. Try another post with the code you use to populate the tableview.

Edit : Here is an example -

B4X:
Sub setup
    tblOne.SetColumns(Array As String("Text", "Numbers"))
    tblOne.Items.Add(Array ("One", 1))
    tblOne.Items.Add(Array ("Two", 2))
    tblOne.Items.Add(Array ("Three", 3))
    tblOne.Items.Add(Array ("Four", 4))
    tblOne.Items.Add(Array ("Five", 5))
End Sub
 

Attachments

  • TableView.zip
    1.9 KB · Views: 51
Last edited:
Upvote 0
Top