I just want to delete if column qty contains value 0 then delete that row
but i get error after delte six records it says object refrence not set to instance
there are total 12 records it delts six record without error
For i As Integer = 0 To dt.Rows.Count - 1
value = DgvStock.Item("Qty", i).Value.ToString
If value = 0 Then
DgvStock.Rows.RemoveAt(i)
DgvStock.Refresh()
End If
DgvStock.DataSource = dt
next