I would like to delete the empty rows from a column. Here is what I've tried but does not work, I am getting an error as "use 'new' keyword to create an object instance"!
Your help would be appreciated, thanks so much.
- For i= data.Rows.Count - 1 To 0 Step -1
- Dim row As DataGridViewRow = data.Rows(i)
- if (Not row.IsNewRow Andalso data.Rows(i).Cells(1).Value.Tostring() = "") Then
- data.Rows.RemoveAt(i)
- Else
- End If
Ako MushaPosted Oct 26, 2018, 4:44 PM
Ako MushaPosted Oct 26, 2018, 2:38 PM
Suraj KumarPosted Oct 26, 2018, 2:18 PM