B4J Question Tableview fill

madru

Active Member
Licensed User
Longtime User
Hi,

is it possible to fill a Tableview from the button to top?

I need to have the newest line always on top

THX
 

Daestrum

Expert
Licensed User
Longtime User
Use TableView.Items.InsertAt(0,yourData)

According to the description, this will force all the other items down (increase their index by 1)
 
Upvote 0

udg

Expert
Licensed User
Longtime User
In its basic form a TV is based on a list, so you just order the list's items in accordance to the desidered effect.
If data are from a DB then use ORDER BY clause in your SELECT statement.

ps: or follow @Daestrum advice if what you need is just to insert the newest item on top of existing ones (even for an initially empty list).
 
Upvote 0

madru

Active Member
Licensed User
Longtime User
In its basic form a TV is based on a list, so you just order the list's items in accordance to the desidered effect.
If data are from a DB then use ORDER BY clause in your SELECT statement.

ps: or follow @Daestrum advice if what you need is just to insert the newest item on top of existing ones (even for an initially empty list).

Hi, yes I tried this before but it is not very efficient in my case as I receive x message to display per second....

THX
 
Upvote 0

udg

Expert
Licensed User
Longtime User
Logging MQTT/Firebase messages? Have a look at how Erel worked it out in his Chat demo based on MQTT (if I recall correctly).
 
Upvote 0
Top