server side sorting and pagination

Hi I have the following code:


	window.a_direction = direction;       
	window.s_col = ind;                        

	return false;   

Now my first problem is that the sorting appears to be working fine, but after the data is loaded the sorting icon disappears and when I click on the header again, it sorts ascending again (doesn’t save the sort state) and then when I click on the second page and greater nothing happens, nothing is loaded in the pages. Please help thank you in advance. :smiley:

Try to use

var grid = this; grid.loadXML("getData.php?dir="+window.a_direction+"&ind="+window.s_col+"&surveyID="+$('#surveyID').val(), function(){ grid.setSortImgState(true,window.s_col,window.a_direction); });

which applies new sorting direction AFTER data reloading.

perfect thank you very much, but there still isn’t any data being loaded on the other pages. any ideas?

I checked on firebug and nothing happens when I change a page, normally it sends get variable: posStart and count.