In .NET 2.0 datagrid (Not the DataGridView) we can select multiple rows from the
mouse and when we press delete button we can delete those rows from the datagrid.
I want to get those selected rows.
How can i do it ?
How to get the selected row set in the dataGrid
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Scott LysleRank #49 · 31K reputationPosted Jan 16, 2008, 6:51 PM EST
You'd said .NET 2.0 DataGrid; if you meant the DataGridView, there is a collection of selected DataGridViewRows:
foreach(DataGridViewRow dr in dataGridView1.SelectedRows) { MessageBox.Show(dr.Cells[0].Value.ToString()); }