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...:)
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
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>