Q:

flex 3 and itemRenderers

i have a datagrid and for one of the columns im using an item renderer to display content. Im wondering is it possible to access the dataprovider content of the datagrid inside a script block in the itemRenderer.
Currently I can access the dataprovider in a component in the item renderer using data.variableName.
I want to be able do some error handling on this variable in the script block, any ideas?

A:

You can specify your own ItemRenderer component. Within the MXML of that component you can use the Script block however like.
Just specify the that component as the ItemRenderer like so:
<mx:DataGrid dataProvider="{ac}">
mx:columns>
    <mx:DataGridColumn>
        <mx:itemRenderer>
            <mx:Component>
                <local:YourRenderer />  
            </mx:Component>
        </mx:itemRenderer>
    </mx:DataGridColumn>
</mx:columns>
</mx:DataGrid>

