RE: [flexcoders] DataGrid auto Sort
Title: RE: [flexcoders] DataGrid auto Sort Here you go, this also includes the direction arrow as well mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml backgroundColor=#FF 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 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.
Re: [flexcoders] DataGrid auto Sort
Very good, your code work fine. Regards Devis Nick Watson ha scritto: Here you go, this also includes the direction arrow as well mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml; backgroundColor=#FF 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:[EMAIL PROTECTED] 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_ http://groups.yahoo.com/gads?t=msk=Computer+software+testingw1=Computer+software+testingw2=Macromedia+flexw3=Developmentw4=Software+developerc=4s=93.sig=kh2CguJwmatU5oBXjFo9Rg _Macromedia flex_ http://groups.yahoo.com/gads?t=msk=Macromedia+flexw1=Computer+software+testingw2=Macromedia+flexw3=Developmentw4=Software+developerc=4s=93.sig=dAUcEV7do91-wrRtVS641g _Development_ http://groups.yahoo.com/gads?t=msk=Developmentw1=Computer+software+testingw2=Macromedia+flexw3=Developmentw4=Software+developerc=4s=93.sig=AlxNUQBOI7Io7S7nhmxV0Q _Software developer_ http://groups.yahoo.com/gads?t=msk=Software+developerw1=Computer+software+testingw2=Macromedia+flexw3=Developmentw4=Software+developerc=4s=93.sig=QWIit8JayomoIHLVkV3FDg YAHOO! GROUPS LINKS §Visit your group _flexcoders_ http://groups.yahoo.com/group/flexcoders on the web. §To unsubscribe from this group, send an email to: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] §Your use of Yahoo! Groups is subject to the _Yahoo! Terms of Service_ http://docs.yahoo.com/info/terms/. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS * Visit your group flexcoders http://groups.yahoo.com/group/flexcoders on the web. * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service http://docs.yahoo.com/info/terms/. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] DataGrid auto Sort
You could sort on multiple columns as well with DataGrid.sortItems(): http://livedocs.macromedia.com/flex/15/asdocs_en/mx/controls/listclasses/DataProvider.html#sortItems There's an exemple herefor flash RecordSets but the logic is the same: http://livedocs.macromedia.com/flashremoting/mx/Using_Flash_Remoting_MX/asDict43.htm Philippe Maegerman From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of DevisSent: mardi 12 juillet 2005 16:27To: flexcoders@yahoogroups.comSubject: Re: [flexcoders] DataGrid auto Sort Very good, your code work fine.RegardsDevisNick Watson ha scritto: Here you go, this also includes the direction arrow as well mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" backgroundColor="#FF" 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:[EMAIL PROTECTED] 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_ http://groups.yahoo.com/gads?t=msk=Computer+software+testingw1=Computer+software+testingw2=Macromedia+flexw3=Developmentw4=Software+developerc=4s=93.sig=kh2CguJwmatU5oBXjFo9Rg _Macromedia flex_ http://groups.yahoo.com/gads?t=msk=Macromedia+flexw1=Computer+software+testingw2=Macromedia+flexw3=Developmentw4=Software+developerc=4s=93.sig=dAUcEV7do91-wrRtVS641g _Development_ http://groups.yahoo.com/gads?t=msk=Developmentw1=Computer+software+testingw2=Macromedia+flexw3=Developmentw4=Software+developerc=4s=93.sig=AlxNUQBOI7Io7S7nhmxV0Q _Software developer_ http://groups.yahoo.com/gads?t=msk=Software+developerw1=Computer+software+testingw2=Macromedia+flexw3=Developmentw4=Software+developerc=4s=93.sig=QWIit8JayomoIHLVkV3FDg YAHOO! GROUPS LINKS § Visit your group "_flexcoders_ http://groups.yahoo.com/group/flexcoders" on the web. § To unsubscribe from this group, send an email to: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] § Your use of Yahoo! Groups is subject to the _Yahoo! Terms of Service_ http://docs.yahoo.com/info/terms/. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com YAHOO! GROUPS LINKS * Visit your group "flexcoders http://groups.yahoo.com/group/flexcoders" on the web. * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service http://docs.yahoo.com/info/terms/. --Flexcoders Mailing ListFAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txtSearch Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 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. --**STATEMENT OF CONFIDENTIALITY** This e-mail and any attached files are confidential and intended solely for the use of the individual to whom it is addressed. If you have received this email in error please send it back to the person that sent it to you. Any views or opinions presented are solely those of author and do not necessarily represent those the Emakina