-
26 Jan 2007 7:15 AM #1
Grid: Post column name (not just id) in remote sort
Grid: Post column name (not just id) in remote sort
In a grid, if you're doing remote paging and sorting, the POSTs only contain the column ID of the sortColumn. Here's how you can add the column name to the POST parameters (until grid 2.0 comes out which sounds like it'll have better column name support):
Code:dataModel.createParams_original = dataModel.createParams; dataModel.createParams = function(pageNum, sortColumn, sortDir){ params = dataModel.createParams_original(pageNum, sortColumn, sortDir); params['sortColumnName'] = dataModel.schema.fields[sortColumn]; return params; };
-
6 Feb 2007 11:22 AM #2
this works really well. thanks
-
18 Feb 2007 4:01 PM #3
I made this work with the XMLDataModel by changing :
To this:Code:params['sortColumnName'] = dataModel.schema.fields[sortColumn];
It should also be noted that I'm using the yui-ext.0.40-alpha release.Code:params['sortColumnName'] = dataModel.getFieldName(sortColumn);
Similar Threads
-
Send sort column number in paged grid in Ext 1.0
By JeffHowden in forum Community DiscussionReplies: 3Last Post: 2 Jun 2008, 11:16 AM -
column sort makes ajax call for each time grid was recreated
By lemontree in forum Ext 1.x: Help & DiscussionReplies: 6Last Post: 4 Jul 2007, 2:14 AM -
Grid: smart remote vs local sort
By brondsem in forum Community DiscussionReplies: 0Last Post: 26 Jan 2007, 7:19 AM -
grid sort marks all rows by the first column
By lsmith in forum Ext 1.x: Help & DiscussionReplies: 8Last Post: 22 Nov 2006, 9:13 AM -
Grid Sort for formatted date column in FF vs IE6
By mrim in forum Ext 1.x: Help & DiscussionReplies: 5Last Post: 31 Oct 2006, 8:28 PM


Reply With Quote