tags:

views:

480

answers:

1

E.g. I have following datagrid

<mx:DataGrid x="331" y="16" height="132" width="419" id="me_claimed" dataProvider="{users.myclaims}"
useRollOver="false">
<mx:columns>
    <mx:DataGridColumn headerText="Claimer" dataField="opponent"/>
    <mx:DataGridColumn headerText="Rank" dataField="rank"/>


    <mx:DataGridColumn headerText="Dismiss claim">
        <mx:itemRenderer>
            <mx:Component>
                <mx:Button label="Delete">
                    <mx:click>
                        <![CDATA[
                            Alert.show("test");

                        ]]>
                    </mx:click>
                    <mx:Script>
                        <![CDATA[
                            import mx.controls.Alert;
                        ]]>
                    </mx:Script>
                </mx:Button>
            </mx:Component>
        </mx:itemRenderer>
    </mx:DataGridColumn>
</mx:columns>
</mx:DataGrid>

I want to send a name of opponent to a webserver after Delete button is clicked. Can I access correspondent value in datagrid on click event?

+2  A: 

yes through the data object:

Alert.show( data.opponent );

Shua