You can get the datagridSelected items by using the datagrid.selectedIndices property.
So that you will get in an array all the indices of the selected items in your DataGrid.
var _selectedIndices:Array = dataGridId.selectedIndices;
and then you can loop through the _selectedIndices Array and addItems to new Array to form new DataProvider for your another DataGrid.
var newDataProvider:Array = new Array();
Message was edited by: BhaskerChari
Thanks for quick reply.. i want this values to assign for the arraycollection not for array...
can u help on that .. the second datagrid dataprovider in an arraycollection.. so that i will make some operations on that arraycollection..
1 person found this helpful
You can simply take an ArrayCollection instead of Array and can use this logic instead.
var newDataProvider:ArrayCollection = new ArrayCollection();
In the above I have assumed firstGridDataProvider is also an ArrayCollection.
You should just be able to use selectedItems.