Announcement

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

    How to sort a calculated field with large data set?

    Using SmartGWT Power, nightly of 2011-03-13

    I have a ListGrid, and one column contains a calculated field. That is, the value of this field is not saved in the database. There are more records in the grid than dataPageSize, hence, according to the sortNormalizer docs:

    Note that, if the dataset exceeds dataPageSize and hence paging is introduced, the grid relies on the server to provide sorting, and the sortNormalizer will no longer be called.
    How should sorting be implemented on this column? Is it possible, since the calculation is done on-the-fly, ie. only on the client-side.

    Or should I save the calculated values in the database? They are just doubles...

    #2
    Either turn off load-on-demand so all data is loaded and a client-side sort is possible, or calculate/store the values on the server as well. There's no other option: to sort properly, any system is going to need the complete dataset.

    Comment

    Working...
    X