Friday, November 19, 2010

How to delete multiple selected rows in a Data Grid View in vb.net?

I'm having a datagridview with 5 rows. I have to delete the selected rows. How to do this. Any idea?How to delete multiple selected rows in a Data Grid View in vb.net?
For each objRow as DataGridViewRow in objMyGrid.SelectedRows

objRow.Remove()

NextHow to delete multiple selected rows in a Data Grid View in vb.net?
Update: Just had to do this myself today and found a much quicker method using one line:

MyDataGridViewObject.Rows.Cl鈥?

Report Abuse

  • PDA
  • No comments:

    Post a Comment