Here is my advance data grid without grouping , 


http://old.nabble.com/file/p29282709/4.png 



Once I apply grouping, sorting is getting lost, see below , 



http://old.nabble.com/file/p29282709/5.png 


Here is piece of code which is applied after grouping is done and the
GroupingCollection is assigned to the grid.



//Sorting grid once grouping done 

                dataGrid.validateNow(); 

                var s:Sort = new Sort(); 

                s.fields = [new SortField("hazardnum")]; 

                s.compareFunction = hazardSortItems; 


                dataGrid.dataProvider.sort=s; 

                dataGrid.dataProvider.refresh(); 


Here is my compare function,



private function hazardSortItems(a:Object, b:Object,fields:Array=null):int {  

             return
ObjectUtil.stringCompare(a.hazardnum.toString(),b.hazardnum.toString(),false); 

    }
-- 
View this message in context: 
http://old.nabble.com/Sorting-problem-after-grouping-tp29282709p29282709.html
Sent from the FlexCoders mailing list archive at Nabble.com.

Reply via email to