Hybrid View
-
12 Mar 2007 9:37 AM #1
Problem with column sort
Problem with column sort
Column sort doesn't work with a grid which was created using addRow function.
It looks like function createNode called from function addRow doesn't work properly.
Code:var xmlstring = '<?xml version="1.0"?><Report><Row></Row></Report>'; if (typeof ActiveXObject != "undefined") { var xmlobject = new ActiveXObject("MSXML.DomDocument"); xmlobject.loadXML(xmlstring); } else { var xmlobject = (new DOMParser()).parseFromString(xmlstring, "text/xml"); } dataModel.loadData(xmlobject); grid.render(); /* * processing cell parameters * URL * Action * Text * add rows into grid. grid must be rendered before. */ /**/ var newRow = new Array(fields.length); for (var i = 0; i < gridData[1].length; i++){ for (var j = 0; j < gridData.length; j++){ if (gridData[j][i][2] == ''){gridData[j][i][2] = ''}; if (gridData[j][i][0] == ''){ newRow[j] = gridData[j][i][2] ; } else { //newRow[j] = '' + gridData[j][i][2] + '' ; newRow[j] = gridData[j][i][2] ; } } dataModel.addRow(null,newRow); } // first empty row must go away dataModel.removeRow(0);
-
1 Apr 2009 2:42 AM #2
Hi, I have the same problem, can someone help us to solve this problem?
...actually, I have a grid, with rows added with addRow, and that works, but, I when I want to sort the data inside that grid nothing happening, I want to sort a grid without server side programming and resiving data for recreating grid, (is it possible to do that, to sort some column like that?)
Cheers
-
1 Apr 2009 9:32 AM #3
This thread is ancient - are you really using 1.x? If not, please create a new thread in 2.x bugs with a working example.
Tim Ryan
Read BEFORE posting a question / BEFORE posting a Bug
Use Google to Search - API / Forum
API Doc (4.x | 3.x | 2.x | 1.x) / FAQ / 1.x->2.x Migration Guide / 2.x->3.x Migration Guide
-
2 Apr 2009 2:32 AM #4
Similar Threads
-
Grid: Post column name (not just id) in remote sort
By brondsem in forum Community DiscussionReplies: 2Last Post: 18 Feb 2007, 4:01 PM -
Bugs in sort and resize Column with JSONDataModel
By rocker in forum Ext 1.x: BugsReplies: 4Last Post: 14 Feb 2007, 6:44 PM -
Using a renderer on a column doesn't seem to work with sort?
By donalconlon in forum Ext 1.x: Help & DiscussionReplies: 7Last Post: 11 Dec 2006, 1:32 PM -
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