15 Replies Latest reply on Jun 7, 2010 6:39 AM by Matt Le Fevre

    handling "enter" key while a user clicks a button being displayed in datagrid

    post2umesh

      Hi,

       

      I have a datagrid of which one non editable column has an itemrenderer render a button while a row is hovered or selected. I am usinhg default tab handling of datagrid. I want to handle the button click event when a user presses enter key while the focus is on this tabbed column.

       

      Can anyone help me how to ahcieve this?

        • 1. Re: handling "enter" key while a user clicks a button being displayed in datagrid
          BhaskerChari Level 4

          Hi,

           

          Write a keyUp event on the Button as shown below:

           

          <mx:Button id="btn" keyUp="if(event.keyCode == 13){handleButtonClick();}" click="handleButtonClick();"/>

           


          If this post answers your question or helps, please kindly mark it as such.


          Thanks,

          Bhasker Chari

          • 2. Re: handling "enter" key while a user clicks a button being displayed in datagrid
            post2umesh Level 1

            Thanks for the prompt response....actually I want to handle the KeyUp event for code 13 only when the datagrid cell which contains button has focus. Use case can be ..when I tab though columns in datagrid and reach this column an dhit enter the handler should invoke......

            • 3. Re: handling "enter" key while a user clicks a button being displayed in datagrid
              BhaskerChari Level 4

              Hi,

               

              Then simply write the keyUp event on the DataGrid. Check the sample code below:

               

              <?xml version="1.0" encoding="utf-8"?>
              <mx:Application xmlns:mx="
              http://www.adobe.com/2006/mxml" layout="absolute">
              <mx:Script>
                <![CDATA[
                 import mx.controls.Alert;
                 import mx.collections.ArrayCollection;
                 [Bindable]
                 private var listUnitMovement:ArrayCollection = new ArrayCollection([{CHECK_PATH:true,NEW_LAT:109.233,NEW_LONG:232.22},{CHECK_PATH:true,NEW_L AT:109.233,NEW_LONG:232.22},{CHECK_PATH:false,NEW_LAT:133.233,NEW_LONG:702.22}]);
                ]]>
              </mx:Script>
              <mx:DataGrid dataProvider="{listUnitMovement}" keyUp="if(event.keyCode == 13){Alert.show('Enter Key Pressed')}">
                <mx:columns>
                 <mx:DataGridColumn>
                        <mx:itemRenderer>
                            <mx:Component>
                                <mx:CheckBox selectedField="CHECK_PATH" change="data.CHECK_PATH=selected"  />
                            </mx:Component>                                       
                        </mx:itemRenderer>
                    </mx:DataGridColumn>
                    <mx:DataGridColumn dataField="NEW_LAT"/>
                    <mx:DataGridColumn dataField="NEW_LONG"/>
                </mx:columns>
              </mx:DataGrid>
              </mx:Application>


              If this post answers your question or helps, please kindly mark it as such.


              Thanks,

              Bhasker Chari

              • 4. Re: handling "enter" key while a user clicks a button being displayed in datagrid
                post2umesh Level 1

                Thanks again for taking time for a promt response.....well the only glitch with attaching it with datagrid is any kep up of 13 code on data grid will invoke a single handler while I might have a datagrid having button in two columns.....the handler needs to be invokded depending upon which column the focus was when the enter button ws pressed....I hope the explanation makes sense.....

                • 5. Re: handling "enter" key while a user clicks a button being displayed in datagrid
                  BhaskerChari Level 4

                  Hi,

                   

                  Please post me sample code you are working reproducing your problem.

                   

                  Thanks,

                  Bhasker Chari

                  • 6. Re: handling "enter" key while a user clicks a button being displayed in datagrid
                    post2umesh Level 1

                    This how my datagrid looks ..main file

                     

                     

                    <?xml version="1.0" encoding="utf-8"?>
                    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                                   xmlns:s="library://ns.adobe.com/flex/spark"
                                   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
                       
                       
                        <fx:Script>
                           
                            <![CDATA[
                                import mx.controls.Alert;
                               
                                public function myKeyDownEvent(event:Event):void{
                                    mx.controls.Alert.show("Selected " + myGrid.columns[0].popupIndex);
                                 }           
                               
                            ]]>
                           
                        </fx:Script>
                       
                       
                       
                       
                        <fx:Declarations>
                                   
                            <fx:XMLList id="transactions">
                                           
                                <transaction>
                                    <type>Unassigned</type>
                                    <date>11-21-2009</date>
                                    <payee>CREDITCARD debit 328</payee>
                                    <payment>10</payment>
                                    <deposit>0</deposit>
                                    <account>My Visa</account>
                                </transaction>
                               
                                <transaction>
                                    <type>Match</type>
                                    <date>11-23-2009</date>
                                    <payee>SAVINGS debit 323</payee>
                                    <payment>10</payment>
                                    <deposit>0</deposit>
                                    <account>My Savings</account>
                                   
                                </transaction>
                               
                                <transaction>
                                    <type>Unassigned</type>
                                    <date>11-24-2009</date>
                                    <payee>CREDITCARD debit 328</payee>
                                    <payment>0</payment>
                                    <deposit>20</deposit>
                                    <account>My Visa</account>
                                   
                                </transaction>
                               
                                <transaction>
                                    <type>Unassigned</type>
                                    <date>11-23-2009</date>
                                    <payee>SAVINGS debit 327</payee>
                                    <payment>0</payment>
                                    <deposit>10</deposit>
                                    <account>My Savings</account>
                                   
                                </transaction>
                               
                                <transaction>
                                    <type>Unassigned</type>
                                    <date>11-21-2009</date>
                                    <payee>CREDITCARD debit 328</payee>
                                    <payment>10</payment>
                                    <deposit>0</deposit>
                                    <account>My Visa</account>
                                   
                                </transaction>
                               
                                <transaction>
                                    <type>Unassigned</type>
                                    <date>11-21-2009</date>
                                    <payee>CREDITCARD debit 328</payee>
                                    <payment>10</payment>
                                    <deposit>0</deposit>
                                    <account>My Visa</account>
                                   
                                </transaction>
                               
                                <transaction>
                                    <type>Unassigned</type>
                                    <date>11-21-2009</date>
                                    <payee>CREDITCARD debit 328</payee>
                                    <payment>10</payment>
                                    <deposit>0</deposit>
                                    <account>My Visa</account>               
                                </transaction>
                               
                                <transaction>
                                    <type>Unassigned</type>
                                    <date>11-21-2009</date>
                                    <payee>CREDITCARD debit 328</payee>
                                    <payment>10</payment>
                                    <deposit>0</deposit>
                                    <account>My Visa</account>               
                                </transaction>
                               
                                <transaction>
                                    <type>Unassigned</type>
                                    <date>11-21-2009</date>
                                    <payee>CREDITCARD debit 328</payee>
                                    <payment>10</payment>
                                    <deposit>0</deposit>
                                    <account>My Visa</account>               
                                </transaction>
                               
                                <transaction>
                                    <type>Unassigned</type>
                                    <date>11-21-2009</date>
                                    <payee>CREDITCARD debit 328</payee>
                                    <payment>10</payment>
                                    <deposit>0</deposit>
                                    <account>My Visa</account>               
                                </transaction>
                               
                                <transaction>
                                    <type>Unassigned</type>
                                    <date>11-21-2009</date>
                                    <payee>CREDITCARD debit 328</payee>
                                    <payment>10</payment>
                                    <deposit>0</deposit>
                                    <account>My Visa</account>               
                                </transaction>
                               
                                <transaction>
                                    <type>Unassigned</type>
                                    <date>11-21-2009</date>
                                    <payee>CREDITCARD debit 328</payee>
                                    <payment>10</payment>
                                    <deposit>0</deposit>
                                    <account>My Visa</account>               
                                </transaction>
                               
                                <transaction>
                                    <type>Unassigned</type>
                                    <date>11-21-2009</date>
                                    <payee>CREDITCARD debit 328</payee>
                                    <payment>10</payment>
                                    <deposit>0</deposit>
                                    <account>My Visa</account>               
                                </transaction>
                               
                                <transaction>
                                    <type>Unassigned</type>
                                    <date>11-21-2009</date>
                                    <payee>CREDITCARD debit 328</payee>
                                    <payment>10</payment>
                                    <deposit>0</deposit>
                                    <account>My Visa</account>               
                                </transaction>
                               
                                <transaction>
                                    <type>Unassigned</type>
                                    <date>11-21-2009</date>
                                    <payee>CREDITCARD debit 328</payee>
                                    <payment>10</payment>
                                    <deposit>0</deposit>
                                    <account>My Visa</account>               
                                </transaction>
                               
                                <transaction>
                                    <type>Unassigned</type>
                                    <date>11-21-2009</date>
                                    <payee>CREDITCARD debit 328</payee>
                                    <payment>10</payment>
                                    <deposit>0</deposit>
                                    <account>My Visa</account>               
                                </transaction>
                               
                                <transaction>
                                    <type>Unassigned</type>
                                    <date>11-21-2009</date>
                                    <payee>CREDITCARD debit 328</payee>
                                    <payment>10</payment>
                                    <deposit>0</deposit>
                                    <account>My Visa</account>               
                                </transaction>
                               
                                <transaction>
                                    <type>Unassigned</type>
                                    <date>11-21-2010</date>
                                    <payee>CREDITCARD debit 328</payee>
                                    <payment>10</payment>
                                    <deposit>0</deposit>
                                    <account>My Visa</account>               
                                </transaction>
                               
                               
                                <transaction>
                                    <type>Unassigned</type>
                                    <date>11-21-2010</date>
                                    <payee>CREDITCARD debit 328</payee>
                                    <payment>10</payment>
                                    <deposit>0</deposit>
                                    <account>My Visa</account>
                                </transaction>
                               
                                <transaction>
                                    <type>Match</type>
                                    <date>11-23-2010</date>
                                    <payee>SAVINGS debit 323</payee>
                                    <payment>10</payment>
                                    <deposit>0</deposit>
                                    <account>My Savings</account>
                                   
                                </transaction>
                               
                                <transaction>
                                    <type>Unassigned</type>
                                    <date>11-24-2010</date>
                                    <payee>CREDITCARD debit 328</payee>
                                    <payment>0</payment>
                                    <deposit>20</deposit>
                                    <account>My Visa</account>
                                   
                                </transaction>
                               
                                <transaction>
                                    <type>Unassigned</type>
                                    <date>11-23-2010</date>
                                    <payee>SAVINGS debit 327</payee>
                                    <payment>0</payment>
                                    <deposit>10</deposit>
                                    <account>My Savings</account>
                                   
                                </transaction>
                               
                                <transaction>
                                    <type>Unassigned</type>
                                    <date>11-21-2010</date>
                                    <payee>CREDITCARD debit 328</payee>
                                    <payment>10</payment>
                                    <deposit>0</deposit>
                                    <account>My Visa</account>
                                   
                                </transaction>
                               
                                <transaction>
                                    <type>Unassigned</type>
                                    <date>11-21-2010</date>
                                    <payee>CREDITCARD debit 328</payee>
                                    <payment>10</payment>
                                    <deposit>0</deposit>
                                    <account>My Visa</account>
                                   
                                </transaction>
                               
                                <transaction>
                                    <type>Unassigned</type>
                                    <date>11-21-2010</date>
                                    <payee>CREDITCARD debit 328</payee>
                                    <payment>10</payment>
                                    <deposit>0</deposit>
                                    <account>My Visa</account>               
                                </transaction>
                               
                                <transaction>
                                    <type>Unassigned</type>
                                    <date>11-21-2010</date>
                                    <payee>CREDITCARD debit 328</payee>
                                    <payment>10</payment>
                                    <deposit>0</deposit>
                                    <account>My Visa</account>               
                                </transaction>
                               
                                <transaction>
                                    <type>Unassigned</type>
                                    <date>11-21-2010</date>
                                    <payee>CREDITCARD debit 328</payee>
                                    <payment>10</payment>
                                    <deposit>0</deposit>
                                    <account>My Visa</account>               
                                </transaction>
                               
                                <transaction>
                                    <type>Unassigned</type>
                                    <date>11-21-2010</date>
                                    <payee>CREDITCARD debit 328</payee>
                                    <payment>10</payment>
                                    <deposit>0</deposit>
                                    <account>My Visa</account>               
                                </transaction>
                               
                                <transaction>
                                    <type>Unassigned</type>
                                    <date>11-21-2010</date>
                                    <payee>CREDITCARD debit 328</payee>
                                    <payment>10</payment>
                                    <deposit>0</deposit>
                                    <account>My Visa</account>               
                                </transaction>
                               
                                <transaction>
                                    <type>Unassigned</type>
                                    <date>11-21-2010</date>
                                    <payee>CREDITCARD debit 328</payee>
                                    <payment>10</payment>
                                    <deposit>0</deposit>
                                    <account>My Visa</account>               
                                </transaction>
                               
                                <transaction>
                                    <type>Unassigned</type>
                                    <date>11-21-2010</date>
                                    <payee>CREDITCARD debit 328</payee>
                                    <payment>10</payment>
                                    <deposit>0</deposit>
                                    <account>My Visa</account>               
                                </transaction>
                               
                                <transaction>
                                    <type>Unassigned</type>
                                    <date>11-21-2009</date>
                                    <payee>CREDITCARD debit 328</payee>
                                    <payment>10</payment>
                                    <deposit>0</deposit>
                                    <account>My Visa</account>               
                                </transaction>
                               
                                <transaction>
                                    <type>Unassigned</type>
                                    <date>11-21-2009</date>
                                    <payee>CREDITCARD debit 328</payee>
                                    <payment>10</payment>
                                    <deposit>0</deposit>
                                    <account>My Visa</account>               
                                </transaction>
                               
                                <transaction>
                                    <type>Unassigned</type>
                                    <date>11-21-2009</date>
                                    <payee>CREDITCARD debit 328</payee>
                                    <payment>10</payment>
                                    <deposit>0</deposit>
                                    <account>My Visa</account>               
                                </transaction>
                               
                                <transaction>
                                    <type>Unassigned</type>
                                    <date>11-21-2009</date>
                                    <payee>CREDITCARD debit 328</payee>
                                    <payment>10</payment>
                                    <deposit>0</deposit>
                                    <account>My Visa</account>               
                                </transaction>
                               
                                <transaction>
                                    <type>Unassigned</type>
                                    <date>11-21-2009</date>
                                    <payee>CREDITCARD debit 328</payee>
                                    <payment>10</payment>
                                    <deposit>0</deposit>
                                    <account>My Visa</account>               
                                </transaction>
                               
                            </fx:XMLList>
                                   
                        </fx:Declarations>
                               
                        <mx:DataGrid id="myGrid" width="100%" height="100%" dataProvider="{transactions}" editable="true" allowMultipleSelection="true" rollOverColor="0x9BDFFA"
                                     selectionColor="0x004B8D" textSelectedColor="white">
                            <mx:columns>
                                <mx:DataGridColumn headerText="Type" dataField="type" itemRenderer="TypeItemRenderer" editable="false"/>
                                <mx:DataGridColumn headerText="Date" dataField="date" />
                                <mx:DataGridColumn headerText="Payee" dataField="payee" />
                                <mx:DataGridColumn headerText="Envelope" dataField="envelope" editable="false" />
                                <mx:DataGridColumn headerText="Payment" dataField="payment" />
                                <mx:DataGridColumn headerText="Deposit" dataField="deposit" />
                                <mx:DataGridColumn headerText="Account" dataField="account" editable="false"/>
                            </mx:columns>
                        </mx:DataGrid>
                           
                    </s:Application>

                    • 7. Re: handling "enter" key while a user clicks a button being displayed in datagrid
                      post2umesh Level 1

                      This is my renderer for teh first column

                       

                      <?xml version="1.0" encoding="utf-8"?>
                      <s:MXDataGridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
                                                xmlns:s="library://ns.adobe.com/flex/spark"
                                                xmlns:mx="library://ns.adobe.com/flex/mx"
                                                focusEnabled="true" xmlns:custom="*" focusedTextSelectionColor="white">
                             
                          <s:states>
                              <s:State name="normal" />           
                              <s:State name="hovered" />
                              <s:State name="selected" />
                              <s:State name="editbuttonClicked"/>
                          </s:states>

                       

                          <fx:Script>
                             
                              <![CDATA[
                                 
                                  import mx.events.CloseEvent;           
                                  import skins.*;
                                     
                                 
                                  public var newValue:String;
                                 
                                  public static var popupIndex:Number=-1;

                       


                                 
                              override public function set data(value:Object):void {
                                  super.data = value;
                                  type.text=value["type"];
                                  newValue=value["type"];          

                       

                              }
                                 
                              public function clickme(event:Object):void{
                                  currentState='editbuttonClicked';  
                              }
                                 
                              public function keyboardclick(event:KeyboardEvent):void{
                                  if(!(event.keyCode == 13))
                                      return;
                                  clickme(event);
                              }
                         
                              ]]>
                          </fx:Script>
                          <s:Label id="type" visible.normal="true" visible.editbuttonClicked="true" color.editbuttonClicked="white"/>   
                          <s:Button id="editDetails" top="0" left="0" right="0" bottom="0" label="Edit Details" click="clickme(event)" cornerRadius="5" visible.normal="false" visible.editbuttonClicked="false" skinClass.hovered="skins.editButton2" skinClass.selected="skins.editButton2" focusEnabled="true"/>
                          <custom:EditDetailsWindow id="frmPUA" displayPopUp.editbuttonClicked="true"/>

                       

                      </s:MXDataGridItemRenderer>

                      • 8. Re: handling "enter" key while a user clicks a button being displayed in datagrid
                        post2umesh Level 1

                        No when I tab through an dreach teh first column and hot enter I need to hadle click

                        event..actually will be opening the edit details UI mentioned in teh renderer..code for that UI is ...

                         

                        <?xml version="1.0" encoding="utf-8"?>

                         

                        <custom:CustomPopUpAnchor popUpPosition= "overRowBelow"
                                           xmlns:fx="http://ns.adobe.com/mxml/2009"
                                           xmlns:s="library://ns.adobe.com/flex/spark"
                                           xmlns:mx="library://ns.adobe.com/flex/mx"
                                           xmlns:custom="CustomPopUpAnchor.*"
                                           focusEnabled="true" styleName="editdetailsStyle">
                                <!-- VBox to hold popUp contents -->
                           
                           
                            <!--fx:Style>
                                .editdetailsStyle {
                                    modalTransparencyBlur: 0;
                                    modalTransparency: 0.0;
                                    modalTransparencyDuration: 500;
                                }
                            </fx:Style-->
                           
                        <s:SkinnableContainer skinClass="MySkin" width="{this.parentDocument.parentDocument.width-17}" height="300">  

                         

                            <mx:Form width="100%" focusEnabled="false">
                                    <mx:FormItem label="Name :">
                                        <s:TextInput/>
                                    </mx:FormItem>                                           
                                    <mx:FormItem label="E-Mail :">
                                        <s:TextInput/>
                                    </mx:FormItem>
                                    <mx:HBox>                                                               
                                        <!-- Button used to close popUp -->
                                        <s:Button label="CLOSE" click="{this.parentDocument.currentState='selected'}"/>
                                    </mx:HBox>
                                </mx:Form>
                               
                            </s:SkinnableContainer>      

                         

                        </custom:CustomPopUpAnchor>  

                        • 9. Re: handling "enter" key while a user clicks a button being displayed in datagrid
                          BhaskerChari Level 4

                          Hi,

                           

                          Actually I am not familiar with Flex4 , I am still using Flex3...Can you please post the screenshot of your application output so that I can suggest something...

                           

                           

                          Thanks,

                          Bhasker Chari

                          • 10. Re: handling "enter" key while a user clicks a button being displayed in datagrid
                            post2umesh Level 1

                            I am attaching a zip version of the project which you can import directly in

                            Flash Builder 4 and see how it works ........

                            • 11. Re: handling "enter" key while a user clicks a button being displayed in datagrid
                              post2umesh Level 1

                              I have replied to your email with a zip version of the project ...I dont whether you will reach ........

                              • 12. Re: handling "enter" key while a user clicks a button being displayed in datagrid
                                BhaskerChari Level 4

                                Hi ,

                                 

                                I dont have FlashBuilder4 installed and I cannot install it.

                                 

                                Can you host the application on any of your server and share link with me...?

                                 

                                 

                                Thanks,

                                Bhasker Chari

                                • 13. Re: handling "enter" key while a user clicks a button being displayed in datagrid
                                  post2umesh Level 1

                                  No I do not have a server ..apologies.....

                                   

                                  Basically , to simply put it , lets have a dtagrid with 4-5 columns.....1

                                  column has a renderer which shows button ......when we tab through and reach

                                  the first column of next row ....and the user hits enter ....the event

                                  should be handled ....

                                  • 14. Re: handling "enter" key while a user clicks a button being displayed in datagrid
                                    post2umesh Level 1

                                    No I do not have a server ..apologies.....

                                     

                                    Basically , to simply put it , lets have a dtagrid with 4-5 columns.....1 column has a renderer which shows button ......when we tab through and reach the first column of next row ....and the user hits enter ....the event should be handled ....
                                    • 15. Re: handling "enter" key while a user clicks a button being displayed in datagrid
                                      Matt Le Fevre Level 4

                                      unsure exactly what you what, but here's an example that'll handle the enter key dependant on which row is currently in focus, tabbing is normally a keycode intercepted by the browser so i'm unsure how you're going to accomplish that

                                       

                                      <?xml version="1.0" encoding="utf-8"?>
                                      <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" applicationComplete="init()">
                                          
                                          <mx:Script>
                                              <![CDATA[
                                                  
                                                  import mx.controls.Alert;
                                                  
                                                  private function init():void
                                                  {
                                                      this.addEventListener(KeyboardEvent.KEY_UP, handleKeyPress);
                                                  }
                                                  
                                                  private function handleKeyPress(event:KeyboardEvent):void
                                                  {
                                                      if((event.keyCode == 13) && dg1.selectedItem)
                                                      {
                                                          Alert.show("You've pressed enter whilst Item: " + 
                                                          "'" + dg1.selectedItem.Name + "' was selected","Alert");
                                                           
                                                      }
                                                      trace(event.keyCode);
                                                  }
                                                  
                                                  public function handleButtonPress():void
                                                  {
                                                      Alert.show("You've pressed the button on Item: " + 
                                                          "'" + dg1.selectedItem.Name + "'","Alert");
                                                  }
                                                  
                                              ]]>
                                          </mx:Script>
                                          
                                          <mx:XML id="dgColl">
                                              <root>
                                                  <Item>
                                                      <ID>123</ID>
                                                      <Name>Test 1</Name>
                                                      <Telephone>27836423784</Telephone>
                                                  </Item>
                                                  <Item>
                                                      <ID>111</ID>
                                                      <Name>Test 2</Name>
                                                      <Telephone>2341688831</Telephone>
                                                  </Item>
                                                  <Item>
                                                      <ID>662</ID>
                                                      <Name>Test 3</Name>
                                                      <Telephone>12323724</Telephone>
                                                  </Item>
                                                  <Item>
                                                      <ID>662</ID>
                                                      <Name>Test 4</Name>
                                                      <Telephone>12323724</Telephone>
                                                  </Item>
                                                  <Item>
                                                      <ID>355</ID>
                                                      <Name>Test 5</Name>
                                                      <Telephone>32422323724</Telephone>
                                                  </Item>
                                                  <Item>
                                                      <ID>193</ID>
                                                      <Name>Test 6</Name>
                                                      <Telephone>77283724</Telephone>
                                                  </Item>
                                              </root>
                                          </mx:XML>
                                          
                                          <mx:DataGrid id="dg1" dataProvider="{dgColl.Item}" x="70" y="153" width="389" height="332">
                                              <mx:columns>
                                                  <mx:DataGridColumn headerText="Name">
                                                      <mx:itemRenderer>
                                                          <mx:Component>
                                                              <mx:Label text="{data.Name}"/>
                                                          </mx:Component>
                                                      </mx:itemRenderer>    
                                                  </mx:DataGridColumn>
                                                  <mx:DataGridColumn headerText="Telephone">
                                                      <mx:itemRenderer>
                                                          <mx:Component>
                                                              <mx:Label text="{data.Telephone}"/>
                                                          </mx:Component>
                                                      </mx:itemRenderer>    
                                                  </mx:DataGridColumn>
                                                  <mx:DataGridColumn headerText="Button">
                                                      <mx:itemRenderer>
                                                          <mx:Component>
                                                              <mx:Button label="Click me" click="outerDocument.handleButtonPress()"/>
                                                          </mx:Component>
                                                      </mx:itemRenderer>    
                                                  </mx:DataGridColumn>
                                              </mx:columns>
                                          </mx:DataGrid>
                                      </mx:Application>

                                       

                                       

                                      It'll either get you started, or maybe it'll help you rephrase what you're after if it's not a solution to what you're trying to accomplish, kinda confused on what you're getting at