PDA

View Full Version : How to make sorting on a server at click on heading of a column of a table extjs?



tsvigo
16 Jan 2012, 8:40 PM
How to make sorting on a server at click on heading of a column of a table extjs?

mitchellsimoens
16 Jan 2012, 9:05 PM
Set remoteSort to true on your store so now when you click on the header of a grid, it will fire off a server call for new data based on the sorting params. You can have one or many sorters at once.

EESW
4 Feb 2012, 12:24 PM
In firebug I see the call going to the server, but the 'sort' and 'dir' parameters are unquoted causing a bad request. My webservice is expecting string paramters and need quotes (%27) around the paramter. I can easily wrap the 'extraParamter' called 'UserName' with quotes, but don't know how to do that for the ExtJS paramters.

http://localhost:56396/ExtronES/wcf/GveWcfDataService.svc/GetAllHelpDeskData?_dc=1328386536484&Locid=1&RoomId=0&UserName=%27admin%27&page=1&start=0&limit=20&sort=DeviceName&dir=ASC (http://localhost:56396/ExtronES/wcf/GveWcfDataService.svc/GetAllHelpDeskData?_dc=1328386536484&Locid=1&RoomId=0&UserName=%27admin%27&page=1&start=0&limit=20&sort=DeviceName&dir=ASC)

Any suggestions?