Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Limit records in listgrid

    Hi,

    I'm evaluating Smartclient for an upcoming project. One of the requirements is to display data records arriving from a web socket in a listgrid. I need to limit the amount of records in the listgrid. I've been looking through the reference guide for an api that would work for this. The idea would be to check the total number of records and if the limit has been reached, delete the oldest record when adding the new one. Would someone be so kind as to point to something in the docs that would help with this? I'm not really finding much so far. It's entirely possible that I just don't know Smartclient well enough yet to know what I'm looking for.

    Thanks,
    Gerry

    #2
    You would basically just:

    1. accrue the records in a JavaScript Array, shortening the Array if you hit the max

    The Array operations here are just generic JavaScript, nothing specific to SmartClient

    2. each time the Array is updated, call listGrid.setData()

    If there is some detail of what you're trying to achieve that we're missing, please ask.

    Comment

    Working...
    X