Announcement

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

    ListGrid - Clear Sort Listener

    Hi,

    With SmartGWT 2.0 and SmartClient 7.1, the 'Clear Sort' was sending a server call (for Live Grids) but would remove the existing 'filter criteria' on the grid.
    So, I migrated to SmartClient 8.0 (2010-03-03), but 'Clear Sort' in this version doesn't fire a server call but just clears the sort specifiers.

    My problem is, I would need a server call when I 'clear sort' but also take the existing 'filter criteria' on the grid to the server.

    Is there no way we can catch a 'Clear Sort' event on a ListGrid and fire a server call.

    For Live Grids, I am encountering a problem with the "Clear Sort" not throwing a server call (because there are records on the server and the client ResultSet has not all the records).

    To exemplify, say my grid's page size is 50. In the first fetch I get the first 50 records (out of say 1000 available) ordered by the primary key 'S.No'. If I now sort on a column 'Name', the top 50 records sorted by 'Name' would be fetched and shown. Now, if I "clear sort", the state of the grid is unchanged but the SortSpecifier is removed. The problem is, now when I scroll the grid, there is no sort column, so I sort by 'S.No' again but, the first 50 records alone in the grid are sorted by 'Name' (that were fetched before clearing the sort).

    Is there some way I could alter this....meaning, send a request to the Server when I 'clear sort' a listgrid.


    Regards,
    Hari.
Working...
X