Announcement

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

    ListGrid sort

    Currently, our list grid sorting is 100% client-side. It was fine, but the only minor detail is that all data must have been fetched and sent back to the browser already before the user can sort.

    What is the simplest way to disable sorting until all data is in the browser? I've tried retrieving the listgrid on DataSource.transformResponse. Initially, it works - I can sort the listgrid but once I sort, the listgrid scrolls back to the beginning and dsResponse.totalRows is once again less than dsResponse.endRow.

    #2
    The default behavior of Adaptive Sorting will use client sort if all data is present, otherwise it will switch to server sort. If you have no server-side sorting at all, you overrride sort() and do nothing if not all data is loaded (use the APIs on ResultSet to check).

    Comment


      #3
      We do not have serverside sorting and do not plan on having such logic any time soon. My problem is that the user can still click on the table column headers as if they are able to sort - when they click on the headers when all data is not present, it gets ignored -which is fine. I just want to change the look of the cursor to reflect this. Kind of like the section header, when canCollapse is set to false, the cursor does not change to the hand cursor.

      Comment


        #4
        You could use DataArrived and check at that time whether the data is fully loaded, then use setFieldProperties to switch to a different baseStyle on the header button (one that appears disabled).

        Comment

        Working...
        X