Hi Flex
1. How to do the catagories column in datagrid.
2. add Delete button in each rows in datagrid in the panels.
<mx:Script>
<![CDATA[
import mx.events.ListEvent;
import mx.collections.ArrayCollection;
[Bindable] private var customers:ArrayCollection = new
ArrayCollection();
private function init():void {
customers = new ArrayCollection(custdata.customer);
}
public function editCell(event:ListEvent):void {
// don't want to edit header
if (event.rowIndex > 0) {
myDG.editedItemPosition = {columnIndex:1,
rowIndex:event.rowIndex-1};
}
}
]]>
</mx:Script>
</mx:Application>
<panel>
<mx:DataGrid>
<mx:columns>
<mx:DataGridColumn dataField="Company" headerText="Company"/>
<mx:DataGridColumn dataField="ID" headerText="ID" width="50"/>
<mx:DataGridColumn dataField="Person" headerText="Person/>
<mx:DataGridColumn dataField="Owner" headerText="Owner"/>
<mx:itemRenderer>
<mx:Component>
<mx:HBox xmlns:mx="
http://www.adobe.com/2006/mxml">
<mx:Script>
<![CDATA[
import
mx.controls.Alert;
import
mx.core.Application;
private
function btnClickAction():void{
Application.application.clickAction();
}
]]>
</mx:Script>
<mx:Button label="Delete"
click="btnClickAction()"/>
</mx:HBox>
</mx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>
</mx:columns>
</mx:DataGrid>
</panel>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex
India Community" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---