I was able to select one row by doing myDataGrid.selectedIndex = 1; <== index number of the row.
However, I'm trying to create a button that select all rows in datagrid.
I have tried following but no success..
private function selectAll() : void {
for( var i:int = 0; i < myDataProvider.length; i++ ){
myDataGrid.selectedIndices[i] = i;
myDataGrid.selectedItems[i] = myDataProvider[i];
}
}
Any idea? any suggestion?

