DataGridView navigating to next row

前端 未结 7 821
野的像风
野的像风 2021-01-19 10:42

I have a C# winforms application and I am trying to get a button working that will select the next row in a datagridview after the one curently selected.

The code I

7条回答
  •  无人及你
    2021-01-19 11:13

    this example to read value cell or column is number 4 of datagridview

            int courow = dataGridView1.RowCount-1;
            for (int i=0; i < courow; i++)
            {
                MessageBox.Show(dataGridView1.Rows[i].Cells[4].Value.ToString());
            }
    

提交回复
热议问题