DatagridView Select last row

后端 未结 8 2014
你的背包
你的背包 2021-02-14 17:20

I have some trouble with setting the last row in my datagridview selected. I select the last row this way:

if (grid.Rows.Count > 0)
{
    try
    {
        gr         


        
8条回答
  •  借酒劲吻你
    2021-02-14 17:51

    It's very easy. use: dataGridView.CurrentCell=dataGridView[ColumnIndex, RowIndex];
    dataGridView[X,y]...
    instead of
    dataGridView[Y, X]...

提交回复
热议问题