header
ask question
Click here to ask Question Now Its free No registration required. Flash, Flex, Flash Media Server, ActionScript,Adobe Air. Most questions receive a response in an hour.
andrich
Points:0
Posts:0

6/9/2010 5:16:32 AM

Title: how to get index of advancedDatagridcolumnGroup on click?


hi i have AdvancedDatagrid column with many AdvancedDataGridColumnGroup..

Now i wanted to get header text of AdvancedDataGridColumnGroup when i click onAdvancedDataGridColumnGroup ...(not AdvancedDataGridColumn)..


or is there any way to get index of AdvancedDataGridColumnGroup on click of it?
Please help me..


can any one give me code?


here is my code..

dg.addEventListener(AdvancedDataGridEvent.HEADER_RELEASE,markHeader);

private function markHeader(evt:AdvancedDataGridEvent):void {


var index:int = evt.columnIndex;
Alert.show("index"+index);

//body



columnGroupArray[index].headerRenderer = new ClassFactory(RadioButtonHeaderRenderer);




thanks in advance...:)



1
Warrior
Points: 380
Posts:0
6/9/2010 6:44:46 AM



you can get the click of item and then loop in the dataprovider to check in which group it falls

2
Brad
Points: 480
Posts:0
6/9/2010 10:17:16 PM



you can use the following script to get the column index


<mx:AdvancedDataGrid headerRelease="handleHeaderClickEvent(event)">
</mx:AdvancedDataGrid>
<mx:Script>
  <![CDATA[

    private function handleHeaderClickEvent(event:AdvancedDataGridEvent):void
    {
      var columnIndex:Number = event.columnIndex;
    }

  ]]>
</mx:Script>


Post your Reply
Name  

Email

Type your Reply or Answer

Are you human? What is 4+0 



Members Login

Email  
Password
Forgot Password





This website focus on: Flash | Flex | FMS | RED5 | WOWZA | Flash Media Server | Adobe AIR | ActionScript,Flash Solutions | Flash Question | Flash Answers | Flash Developers | Flash Problem, Flash Help, Flash bugs, Flash workaround | Flash Blog | Flex Question Answers | Flash Forum | Flex Development | Actionscript development | Flash development | Adobe AIR development
Copyright © 2008 AskMeFlash.com. All rights reserved. Privacy Policy | Terms & Conditions