I am using dhtmlx treegrid with following code
mygrid = new dhtmlXGridObject(‘gridbox3’);
mygrid.selMultiRows = true;
mygrid.imgURL = document.getElementById(“aDhtmlxImg”).src;
mygrid.setHeader(" , ,Name,Version,Status,Author,Modified By,Modified On,Hidden");
mygrid.setInitWidths(“25,25,200,55,60,90,70,125,0”);
mygrid.setColAlign(“left,left,left,left,left,left,left,left,left”);
mygrid.setColTypes(“ro,ro,tree,ro,ro,ro,ro,ro,ro”);
mygrid.attachEvent(“onBeforeSelect”,beforeRowSelected);
mygrid.attachEvent(“onRowSelect”,doOnRowSelected);
mygrid.enablePaging(true,10,3,“pagingArea”,true,“recinfoArea”);
mygrid.enableTreeCellEdit(false);
mygrid.init();
mygrid.loadXML(“documents.xml”);
My problem is that documents.xml file doesnt have data in sorted order. So is there any way I can load data in Alphabetical order in grid OR I can load the data and then call some function to sort it?
thanks in advance.
Robin
You can sort data after loading
mygrid.loadXML(“documents.xml”,function(){
mygrid.sortRows(2,“str”,“asc”);
});
Thank you…
Its solved my initial problem…but I have another issue here.
After sorting, in the 3rd column I am seeing small image “line3.gif” ahead of text (3rd column)…which I dont want to display unless there is a child to that row.
Please let me know how to remove it.
Thanks in advance.
Robin
Please try to use attached js file instead of original one.
If issue still occurs for you - please provide a sample of problematic XML. ( you can send it directly to support@dhtmlx.com )
dhtmlxtreegrid_lines.zip (1.07 KB)
One more issue…
In FireFox 3, if there are more than 1 page…sorting doesnt work…I get an error “TypeError: this.rowsCol[i].parentNode is null”. Please help me out…its urgent
Thanks
Robin
Answered by email.