views:

903

answers:

2

I have id(array) used in my application . i want to select number of rows mathching given array but if i used gatagrid selected Index then it will be selected only one row only . i set data grid allowMultipleSelection="true" also .. . how can be select mutipule rows in datagrid ? please refer me

for(var i:int=0;i<id.length;i++)
  {

   datagrid.selectedIndex=id[i];
  }
A: 

try setting them through selectedItems instead that allows you to set multiples.

Gregor Kiddie
+2  A: 

If id is an array of integers, you should be able to do this:

datagrid.selectedIndices = id;
susichan
thanks susichan it's working
UNKNOWN