Announcement

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

    SmartClient 8 / ListGrid Multiple Sort question

    Hello,

    I have searched without success to find which method should be used to apply the sort on the server (ie while generating the data to send to the ListGrid).

    In SmartClient 7, I used the method "sortData" of the "ListGrid" to do that.

    In SmartClient 8, it appears that this method is no longer used for multiple sorts.

    Can you tell me which method I should use in SmartClient 8 ?

    Thank you

    #2
    listGrid.setSort()

    Comment


      #3
      Thank you for your answer, however, i'm still facing an issue here. I'll explain :

      When a sort is done on a column of grid, there are two parts :
      1/ Modifying the header
      2/ Sorting the data

      In version 7 of SmartClient, when the "sort" method is called,
      1/ The header is modified
      2/ The "sortData" is called to sort the data
      so by overriding the "sortData" method, I was able to do the sort that I need (not a local sort) by calling an URL on the server (in my webapp) that sorts the date and getting back the new data to display in the ListGrid and then displaying my data in the ListGrid.

      In version 8 of SmartClient, when I click on the header of a field in the list, using the "setSort" method modifies the header AND sorts the data locally but I don't need the second part (sorting), I will supply and load the new data to display.

      In version 7, the two parts were separated so by overriding "sortData" I could only modify the data sort part.
      In version 8, I would need to override the "setSort" but I would lose the modified header part too.

      How can I achieve that in version 8 of SmartClient ? That is keeping the part that modifies the header and only modifiying the part that sorts de data.

      Thank you

      Comment


        #4
        sortData was an undocumented internal API.

        The correct way to do this is via the DataSource layer, which already gives you an opportunity to sort by issuing a request to the DataSource for sorted data.

        Comment

        Working...
        X