Sorry mark, I wrote that code from the top of my head… see the fix to line #5. 'columns' is in iList, probably an ArrayList and [-] does not work there, you have to use getItemAt(). That way you can make it generic.
And you do not need to clear up the dataProvider's sort, unless you have set it your self. Also, if you want to trap the DG sort on header click, you can either disable sorting altogether, or handle columnClick and deal with that yourself. cheers, julio On May 2, 2013, at 2:03 PM, [email protected] wrote: > private function redrawGrid():void { > arrCol.sort=null; > arrCol.refresh(); > myGrid.columnHeaderGroup.visibleSortIndicatorIndices = new <int>[0]; > myGrid.columns.getItemAt(0).sortDescending= true; // or false for ascending > arrow > } -- Julio Carneiro
