Click to See Complete Forum and Search --> : Rmove selected row from datagridview


nader
November 9th, 2008, 10:48 AM
I tried this code to remove the selected row in DataGridView but didn't succeed with can you help please?


Dim i As Integer = DataGridView3.SelectedRows.Count
Me.DataGridView3.Rows.RemoveAt(i)

nader
November 9th, 2008, 01:12 PM
Here is:
DataGridView3.Rows.Remove(DataGridView3.CurrentRow)

TheCPUWizard
November 9th, 2008, 02:18 PM
Yes, your first attempt was tring to remove one past the last row which actually exists, and had nothing to do with selection....