Categories | Question details Back To List | ||||||||
DHTMLX Tree Grid : Loading the data in Alphabetical order of column 3 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 Answer posted by Support on Oct 09, 2008 01:48 You can sort data after loading mygrid.loadXML("documents.xml",function(){ mygrid.sortRows(2,"str","asc"); }); Answer posted by Robin on Oct 09, 2008 07:02 Thank you... Answer posted by Robin on Oct 09, 2008 07:52 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
Answer posted by Support on Oct 09, 2008 08:00 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 ) Attachments (1)
Answer posted by Robin on Oct 09, 2008 10:17 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
Answer posted by Support on Oct 10, 2008 05:36 Answered by email. |