Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by C. Bernstein on Jun 17, 2009 04:50
open dhtmlx forum
dhtmlxTreeGrid Sorting

I was somewhat confused by past posts and answers:
Is column sorting supported in the tree grid? It is not working for me. I have my grid defined as:

rosterGrid.setImagePath("/codebase/imgs/");
rosterGrid.imgURL = "/codebase/imgs/icons_greenfolders/";
rosterGrid.setHeader("NAME,GENDER,STATUS");
rosterGrid.setColumnIds("NM,GDR,ST");
rosterGrid.setInitWidths("250, 100, 75");
rosterGrid.setColAlign("left,left,left");
rosterGrid.setColTypes("tree,ro,ro");
rosterGrid.setColSorting("str,str,str");
rosterGrid.enableColumnMove(true);
rosterGrid.init();

When I click on the column title to sort by gender, for instance, it does not sort properly. If sorting is supported, is there anything else I need to do to get it to work?

Thanks for your help.
Answer posted by dhxSupport on Jun 17, 2009 05:41
>>When I click on the column title to sort by gender, for instance, it does not sort properly
After clicking on the column header with "tree" type sorting is going by the parent items and order of parent items being changin.
After clicking on any other column order of parent items not changed, but rows in the branch sorted in necessary order. 
There is no way change that behaviour. If you have any other issue please desribe it more detailed
Answer posted on Jun 17, 2009 05:47

Thank you for the clarification.  Is this documented anywhere that you could direct me?

 

Answer posted by dhxSupport on Jun 17, 2009 08:40
Please see more information about filtering in grid and treeGrid here http://dhtmlx.com/docs/products/dhtmlxGrid/doc/articles/Sorting_in_grid.html#grid_art_sort