I have a datagridview dgvList.. Then I want to get the cell value of a particular row and column, without using the selectedRows property.
ie:
myvalue = dgvList[2nd row][1st column];
I have a datagridview dgvList.. Then I want to get the cell value of a particular row and column, without using the selectedRows property.
ie:
myvalue = dgvList[2nd row][1st column];
Try This
myvalue =dgvList.Rows[rowindex].Cells[columnindex].Value.ToString();
how to display database value in dvg in dgv cell leave event
str = "select pprice from product_tbl2 where name='" & Me.DataGridView1.CurrentRow.Cells(1).Value.ToString() & "'"
cmd.CommandText = str
MsgBox(cmd.CommandText)
cmd.Connection = cn
da = New SqlDataAdapter(cmd.CommandText, cn)
dt = New DataTable()
da.Fill(dt)
dvg.currentrows.cell(3) = dt.Rows(0)(0).ToString()