jQWidgets Forums

jQuery UI Widgets Forums Grid Apply dynamic sorting

This topic contains 3 replies, has 3 voices, and was last updated by  Dimitar 9 years, 6 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • Apply dynamic sorting #77574

    Gunjan
    Participant

    Hi,

    I have to apply custom sorting function after receiving data from the server. I am doing this in beforeprocessing callback function, but sorting is not working after loading of the grid. Once I navigate to next page of the grid it starts working. Please suggest any solution to make sorting work just after grid load.

    Thnaks,
    Gunjan

    Apply dynamic sorting #77576

    Vladimir
    Participant

    Hello Gunjan,

    The beforeprocessing callback funciton is deprecated. Please use loadComplete or beforeLoadComplete callbacks.

    Best Regards,
    Vladimir

    jQWidgets Team
    http://www.jqwidgets.com

    Apply dynamic sorting #77628

    Gunjan
    Participant

    Hi Vladimir,

    It didn’t work with loadComplete or beforeLoadComplete callbacks. My code is as below:

    var dataAdapter = new $.jqx.dataAdapter(source, {                
               loadComplete: function (records) {
                       source.sort = customsort;                   
               }
    });

    Thanks,
    Gunjan

    Apply dynamic sorting #77646

    Dimitar
    Participant

    Hi Gunjan,

    You do not need to set the sort function in any of these callbacks. Just set it in the source object, as shown in the demo Custom Sorting.

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.