Get selected column index and row index : DataGrid Style « Grid « Flex

Home
Flex
1.Chart
2.Components
3.Container
4.Data Model
5.Development
6.Effects
7.Event
8.Graphics
9.Grid
10.Style
Flex » Grid » DataGrid StyleScreenshots 
Get selected column index and row index
Get selected column index and row index
         

<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
    layout="absolute">
    <mx:Script>
        
        import mx.events.ListEvent;
        private function itemClickEvent(event:ListEvent):void {
            clickColumn.text=String(event.columnIndex);
            clickRow.text=String(event.rowIndex);
            eventType.text=event.type;
        }
      
    </mx:Script>
    <mx:DataGrid id="myGrid" width="350" height="150" itemClick="itemClickEvent(event);" x="112" y="10">
        <mx:ArrayCollection>
            <mx:Object Artist="A" Album="aa" Price="11.99" />
            <mx:Object Artist="B" Album="bb" Price="11.99" />
        </mx:ArrayCollection>
    </mx:DataGrid>
    <mx:TextArea id="clickColumn" x="191" y="199" />
    <mx:TextArea id="clickRow" x="191" y="253" />
    <mx:TextArea id="eventType" x="191" y="305" />
</mx:Application>

   
    
    
    
    
    
    
    
    
  
Related examples in the same category
1.Styling rowsStyling rows
2.Styling columnsStyling columns
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.