Here you go, this also includes the direction arrow as well
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" backgroundColor="#FFFFFF">
<mx:Script>
<![CDATA[
function showArrow(){
myGrid.sortItemsBy("value","asc");
myGrid.sortIndex = 1;
myGrid.sortDirection = "ASC";
myGrid.placeSortArrow();
}
]]>
</mx:Script>
<mx:Panel title="DataGrid Panel" marginTop="10">
<mx:VBox initialize="showArrow()">
<mx:DataGrid id="myGrid" showDataTips="true" width="350" height="150">
<mx:dataProvider>
<mx:Array id="arr">
<mx:Object name=" a" Value="Test_1" />
<mx:Object name=" b" Value="Test_2" />
<mx:Object name=" a" Value="Test_3" />
<mx:Object name=" a" Value="Test_4" />
<mx:Object name=" b" Value="Test_5" />
</mx:Array>
</mx:dataProvider>
</mx:DataGrid>
</mx:VBox>
</mx:Panel>
</mx:Application>
Regards
Nick
From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Devis
Sent: 12 July 2005 14:51
To: flexcoders@yahoogroups.com
Subject: [flexcoders] DataGrid auto Sort
Sorry for my stupid question
i have a simple dataGrid i wish when my application start, that the
DataGrid are sorted with column number 3?
It's possibile please
Devis
>
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
Computer software testing Macromedia flex Development
Software developer
YAHOO! GROUPS LINKS
§ Visit your group "flexcoders" on the web.
§ To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
§ Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
---- LSpots keywords ?> ---- HM ADS ?>
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.