I have a datagrid with a custom renderer for the id column. What I want to
accomplish is letting the user select as many rows as they want by clicking
on the checkbox in the first column. When they click the export button I
will do some logic to export only the selected records to a txt file. Going
by the solution below how can i figure out what indexes are selected? Even
if i can't easily get a list of all the id's I can run over the index list
and get the actuall id's.
If there is a better way to do this and I am going about this the wrong way
please speak up! Thanks in advance!
<mx:DataGrid id="contacts" width="100%" height="100%"
dataProvider="{_data}">
<mx:columns>
<mx:DataGridColumn dataField="id"
headerText="Select" width="40" textAlign="center">
<mx:itemRenderer>
<mx:Component>
<mx:CheckBox click=""/>
</mx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>
<mx:DataGridColumn dataField="companyName"
headerText="Company"/>
<mx:DataGridColumn dataField="firstName"
headerText="First Name"/>
<mx:DataGridColumn dataField="lastName"
headerText="Last Name"/>
<mx:DataGridColumn dataField="city"
headerText="City"/>
<mx:DataGridColumn dataField="state"
headerText="State"/>
</mx:columns>
</mx:DataGrid>
Thank You
Dan Vega
[EMAIL PROTECTED]
http://www.danvega.org