c# datagridview selected row index

113

c# datagridview get selected row values -

int rowindex = dataGridView1.CurrentCell.RowIndex;
int columnindex = dataGridView1.CurrentCell.ColumnIndex; 

dataGridView1.Rows[rowindex].Cells[columnindex].Value.ToString();

vb.net datagridview set row index -

DataGridView1.CurrentCell = DataGridView1.Item(column, row)

Comments

Submit
0 Comments