Yes, you'll want to look into the listData property. Flex
automatically populates it for drop-in editors and renderers, so if
your renderer implements IDropInListItemRenderer or inherits from a
class that does (Button, Label, ComboBox, plus 11 more) then you will
be able to access listData. When your renderer is in a DataGrid,
listData will be of type DataGridListData, which provides properties
like dataField, columnIndex, rowIndex, etc.

HTH,
Ben


--- In flexcoders@yahoogroups.com, "triggersoftware" <[EMAIL PROTECTED]>
wrote:
>
> Is there any way I can access the "dataField" field from within a
> custom item renderer?
> 
> <mx:DataGridColumn itemRenderer="MyCustomComponent"
> dataField="startDate"/>
> <mx:DataGridColumn itemRenderer="MyCustomComponent"
dataField="endDate"/>
> 
> In this case the component MyCustomComponent would know to look at the
> data.startDate field when displaying the first column and the
> data.endDate field when displaying the second column.  I would imagine
> the component to look something like:
> 
> <mx:Label text="{formatter.format(data[dataField])}"/>
>


Reply via email to