Add a CheckBox column with following code:
<mx:AdvancedDataGridColumn headerText="" dataField="selected"
editable="true" editorDataField="selected"
itemRenderer="mx.controls.CheckBox" rendererIsEditor="true" paddingLeft="5"
paddingRight="5" width="25" sortable="false" />
A Save Button will call the following function:
private function saveButton(event:Event):void
{
var myArrayCollection:ArrayCollection = new ArrayCollection();
for each(var item:Object in resultsDataGrid.dataProvider) // resultsDataGrid
is your DataGrid with checkbox
{
if(item.selected)
myArrayCollection.addItem(item);
}
}
Hope it helps
--
Aviral Sharma
Web: http://aviralsharma.com
On Tue, Jan 26, 2010 at 15:43, Soumya Here <[email protected]>wrote:
> Hi All,
>
>
>
> In my case, I got an ArrayCollecion from RemoteObject call and populate a
> Datagrid for display in front end.
>
> There I want to add a checkbox for select a specific row of data from that
> Datagrid and at the end when I click on the save button I want to catch only
> the selected rows so that I can send to backend java for update the DB.
>
>
>
> I create and render a checkbox for that purpose and I also able to show
> that rendered checkbox to that Datagrid, but not able to proceed
> further......Need some code.
>
> Please help me out.
>
> Thanks in advance.
>
>
>
> Thanks,
>
> Soumya
>
>
>
>
>
>
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Flex India Community" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<flex_india%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/flex_india?hl=en.
>
--
You received this message because you are subscribed to the Google Groups "Flex
India Community" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/flex_india?hl=en.