Can anyone helpme In adding new row to DataGridView?
I tried this but it didn't work
vb Code:
Dim _row As DataGridViewRow _row.Cells(0).Value = "Value1" _row.Cells(1).Value = "Value2" DataGridView1.Rows.Add(_row)
it just give one Warning in the Error list saying
and after dubug it highlight this partVariable '_row' is used before it has been assigned a value. A null reference exception could result at runtime.
vb Code:
_row.Cells(0).Value = "Value1"
and type this
help plzObject reference not set to an instance of an object.
thnx





Reply With Quote