isSelected property of tablerow is not correct

Aug 25, 2009 at 10:38 AM
Edited Aug 25, 2009 at 10:41 AM

Hi All,

 Table table = DummyForm.Get<Table>("dataGridView1");

 Console.WriteLine("Rows " + table.Rows.Count);

foreach (TableRow row in table.Rows)

{

   Console.WriteLine("Selected Rows " + row.IsSelected

}

 above code returns rows count 7.But row.IsSelected property is false for every row even there are selected rows in datagrid

I dont why this is not giving me right result

Please help me

 

Thanks

Sanjeev