jQWidgets Forums

jQuery UI Widgets Forums Grid Remove sort without sending data

This topic contains 3 replies, has 3 voices, and was last updated by  wavetrex 10 years, 3 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • Remove sort without sending data #67101

    nikitaso
    Participant

    Is it possible to remove sort without sending request to back server? Like ‘removefilter’ where you set ‘false’

    Remove sort without sending data #67103

    nikitaso
    Participant

    What I mean is that I want to add indicator that column is sorted, data comes back from server already presorted.

    Remove sort without sending data #67169

    Dimitar
    Participant

    Hello nikitaso,

    If you have implemented server-side sorting, a request will be send to the server each time you call removesort. In this case, the sorting is handled by the server and the requests are necessary. There is no way to disable this behaviour.

    Best Regards,
    Dimitar

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

    Remove sort without sending data #67231

    wavetrex
    Participant

    Wait, isn’t it possible to not detect that in the “sort” callback of the dataAdapter ?

    
    	sort: function() {
    		$("#mygrid").jqxGrid('updatebounddata', 'sort');
    	},
    

    It should be simple enough to set a flag before calling “removesort” and exit from the callback instead of doing the updatebounddata.

    
    	do_not_update = true;
    	$("#mygrid").jqxGrid('removesort');
    	do_not_update = false;
    

    And the callback changed like this:

    
    	sort: function() {
    		if(do_not_update)
    			return;
    		$("#mygrid").jqxGrid('updatebounddata', 'sort');
    	},
    

    Maybe it works for you 😉

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

You must be logged in to reply to this topic.