vyellep
04-15-2008, 07:36 AM
Is there a simple way to make DataGrid not sort the "column names" by alphabetical order. It appears that if I populate a DataGrid's Dataprovider with an ArrayCollection and do not define any <mx:Columns/> like
<mx:columns>
<mx:DataGridColumn dataField="x" id="x"/>
<mx:DataGridColumn dataField="a" id="a"/>
</mx:columns>
then it shows the data as if the columsn were defined like this
<mx:columns>
<mx:DataGridColumn dataField="a" id="a"/>
<mx:DataGridColumn dataField="x" id="x"/>
</mx:columns>
I guess I can define headerTexts in the order I want but is there a way to change the default behaviour and make it not sort the column names but show them the way the ArrayCollection has the label/data organized
Thanks
<mx:columns>
<mx:DataGridColumn dataField="x" id="x"/>
<mx:DataGridColumn dataField="a" id="a"/>
</mx:columns>
then it shows the data as if the columsn were defined like this
<mx:columns>
<mx:DataGridColumn dataField="a" id="a"/>
<mx:DataGridColumn dataField="x" id="x"/>
</mx:columns>
I guess I can define headerTexts in the order I want but is there a way to change the default behaviour and make it not sort the column names but show them the way the ArrayCollection has the label/data organized
Thanks