следующая проблема.
Я хочу получить индекс строки и индекс столбца удаленной строки datagridview для некоторых вычислений и обновлений. Но ошибка, которую я продолжаю получать, - это ссылка на объект, не установленная на экземпляр объекта. Я написал код в событии удаления строк данных gridview. Вот код.
Try
delflag = True
Dim quant As Integer
If dgsalesitem.CurrentRow.Cells(0).Value = 0 Then
quant = dgsalesitem.CurrentRow.Cells(1).Value
Else
quant = dgsalesitem.CurrentRow.Cells(0).Value
End If
UpdateStock(dgsalesitem.CurrentRow.Cells(2).Value.ToString, dgsalesitem.CurrentRow.Cells(9).Value.ToString, dgsalesitem.CurrentRow.Cells(10).Value.ToString, quant, False)
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub