Announcement

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

    Mulitple sorting requests in ListGrid

    Hi,

    I would like to please you with help of my problem.

    I'm using smartGWT version 2.4 and I want to implement custom server side paging in ListGrid, for that purpose when user click on next page, I receive next data page and set it to ListGrid in this method of my list grid (data list contains all data I want to have in listGrid):
    Code:
    ResultSet dataResultSet = new ResultSet();
    dataResultSet.setDataSource(getDataSource());
    dataResultSet.setFetchMode(FetchMode.PAGED);
    dataResultSet.setUseClientFiltering(false);
    dataResultSet.setUseClientSorting(false);
    dataResultSet.setInitialData(data.toArray(new Record[0]));
    dataResultSet.setResultSize(endRow - startRow + 1);
    setDataPageSize(endRow - startRow + 1);
    setData(dataResultSet);
    Data items are correctly set in ListGrid and also filtering is working correctly, the problem is with sorting, when I click on sorting in listGrid (or call sort() directly on listGrid), smartClient creates 2 requests. First request has startRow 0, endRow = pageSize - 1, that is correct request. Second request has startRow 980 and endRow 1000, this request shouldn't be invoked and it's not clear for me why was created

    When I set dataResultSet.setResultSize(1000); it works correclty, but the problem is that when I setData with created dataSet next time, smartClient creates also 2 requests.

    I think I'm missing something in my ResultSet but can not find the problem there.

    Could you please advice me where can be problem or have can I solve it?

    Thanks a lot for answers
    Last edited by msimun; 31 Jul 2011, 15:16.
Working...
X