4 Replies Latest reply on Aug 5, 2008 6:20 PM by Newsgroup_User

    Item Renderer for DataGrid

      I have a button component as a Item renderer in the column of the datagrid .
      I am not able to access the Itemrenderer component(which I declared in other mxml file in the datagrid)
      This is the data grid where I have the Itemrenderer:

      <mx:DataGrid id="dgCondition1"
      variableRowHeight="true" width="100%" height="150" verticalScrollPolicy="auto" editable="true" dataProvider="{initDataGrid_Create}" >
      <mx:DataGridColumn headerText="" dataField="conditi" />
      <mx:DataGridColumn headerText="Condition" dataField="syntax" width="300" />
      <mx:DataGridColumn headerText="1" dataField="value" width="80" editable="false" itemRenderer="buttonRenderer"/>
      <mx:DataGridColumn dataField="value" headerText="2" itemRenderer="buttonRenderer" />

      I created a new mxml component for this button component .(buttonRenderer.mxml)

      <?xml version="1.0" encoding="utf-8"?>

      <mx:VBox xmlns:mx=" http://www.adobe.com/2006/mxml" width="400" height="300">
      <mx:Script source="..TableDataGridBtn.as" />
      <mx:Button id="col1" label="" width="75" click="getDetail(event,col1)" />

      The Problem is I am not able to access the buttonRenderer in the datagrid itemRenderer tag .
      It says "Access of Undefined Property buttonRenderer".