|
Try this: <?xml version="1.0"?> <mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml" initialize="initApp()">
<mx:Script>
public function initApp():void {
var arr: Array = new Array();
arr.push({one:"abc", two: "ABC"});
arr.push({one:"def", two: "DEF"});
arr.push({one:"ghi", two: "GHI"});
dg.dataProvider = arr;
}
public function onFocusIn(event:Event):void{
event.target.setStyle("borderStyle","none");
}
public function onFocusOut(event:Event):void{
event.target.setStyle("borderStyle","outset");
}
</mx:Script>
<mx:Component id="inlineEditor">
<mx:TextInput text=""
focusIn="outerDocument.onFocusIn(event)"
focusOut="outerDocument.onFocusOut(event)"
borderStyle="none" preinitialize="initTI();">
<mx:Script>
<![CDATA[
import
mx.controls.dataGridClasses.DataGridListData;
import
flash.events.Event;
public
function initTI():void {
addEventListener("dataChange", handleDataChanged);
}
public
function handleDataChanged(event:Event):void
{
// Cast listData to DataGridListData.
var myListData:DataGridListData = DataGridListData(listData);
text=data[myListData.dataField];
}
]]>
</mx:Script>
</mx:TextInput> </mx:Component>
<mx:DataGrid
id="dg"
width="100%"
height="100%"
editable="true"
tabEnabled="true"
>
<mx:columns>
<mx:Array>
<mx:DataGridColumn dataField="one" rendererIsEditor="true"
itemRenderer="{inlineEditor}"/>
<mx:DataGridColumn dataField="two"
rendererIsEditor="true" itemRenderer="{inlineEditor}"/>
</mx:Array>
</mx:columns>
</mx:DataGrid>
<mx:ControlBar horizontalAlign="right">
<mx:Button label="reset" click="initApp()"/>
</mx:ControlBar>
</mx:Application>
From:
[email protected] [mailto:[EMAIL PROTECTED] On Behalf Of B.Brey Well i need the data for the current cell.
Is there any way to find out which column is the current column rendered?
|
- Re: [flexcoders] Custom itemrenderer in datagrid Webdevotion
- RE: [flexcoders] Custom itemrenderer in datagrid B.Brey
- Re: [flexcoders] Custom itemrenderer in datagrid Webdevotion
- RE: [flexcoders] Custom itemrenderer in datagrid B.Brey
- RE: [flexcoders] Custom itemrenderer in datagr... Kyle Quevillon
- RE: [flexcoders] Custom itemrenderer in datagrid Dirk Eismann
- Re: [flexcoders] Custom itemrenderer in datagrid Thomas Ott


