<?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:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<fx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
[Bindable]
public var arr:ArrayCollection = new ArrayCollection([{id:"1",value:"anna"} , {id:"2",value:"durai"} ]);
]]>
</fx:Script>
<mx:HBox height="100%" width="100%">
<s:DataGrid height="100%" dataProvider="{arr}" width="100%">
<s:columns>
<mx:ArrayList>
<s:GridColumn dataField="id" >
</s:GridColumn>
<s:GridColumn dataField="value">
<s:headerRenderer>
<fx:Component>
<s:DefaultGridHeaderRenderer>
<mx:HBox height="100%" width="100%">
<mx:Image source="./addNew.png" />
</mx:HBox>
</s:DefaultGridHeaderRenderer>
</fx:Component>
</s:headerRenderer>
<s:itemRenderer>
<fx:Component>
<s:GridItemRenderer>
<mx:HBox backgroundColor="red" height="100%" width="100%">
<s:TextInput />
</mx:HBox>
</s:GridItemRenderer>
</fx:Component>
</s:itemRenderer>
</s:GridColumn>
</mx:ArrayList>
</s:columns>
</s:DataGrid>
</mx:HBox>
</s:Application>
<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:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<fx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
[Bindable]
public var arr:ArrayCollection = new ArrayCollection([{id:"1",value:"anna"} , {id:"2",value:"durai"} ]);
]]>
</fx:Script>
<mx:HBox height="100%" width="100%">
<s:DataGrid height="100%" dataProvider="{arr}" width="100%">
<s:columns>
<mx:ArrayList>
<s:GridColumn dataField="id" >
</s:GridColumn>
<s:GridColumn dataField="value">
<s:headerRenderer>
<fx:Component>
<s:DefaultGridHeaderRenderer>
<mx:HBox height="100%" width="100%">
<mx:Image source="./addNew.png" />
</mx:HBox>
</s:DefaultGridHeaderRenderer>
</fx:Component>
</s:headerRenderer>
<s:itemRenderer>
<fx:Component>
<s:GridItemRenderer>
<mx:HBox backgroundColor="red" height="100%" width="100%">
<s:TextInput />
</mx:HBox>
</s:GridItemRenderer>
</fx:Component>
</s:itemRenderer>
</s:GridColumn>
</mx:ArrayList>
</s:columns>
</s:DataGrid>
</mx:HBox>
</s:Application>
No comments:
Post a Comment