Hi,

Try this code :

 <mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" backgroundColor="#FFFFFF">

    <mx:Script>

    <![CDATA[

        function showArrow(){

                        myGrid.sortItemsBy("name","asc");

            myGrid.sortIndex = 1;

            myGrid.sortDirection = "ASC";

            myGrid.placeSortArrow();

         }
   function showArrow1(){

                        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();showArrow1()">

            <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>

Thanks
-Rajni


On Sat, Mar 25, 2006 at  3:50 AM, Mehdi, Agha wrote:

Hi,
How can I read sort direction (ASC/DESC) when user click s on Grid column to sort ?
Thanks
Agha Mehdi <>
IDT - eBusiness Program Manager
Work: 408.284.8239
Cell  : 209.275.0482
Fax  :  408.284.2766



--
Flexcoders Mailing List


___________________________________

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:
 
   •  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service <http://docs.yahoo.com/info/terms/> .

___________________________________



--
Sent using Laszlo Mail. Try it yourself.
http://www.laszlomail.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




Reply via email to