DatagridView Select last row

后端 未结 8 2028
你的背包
你的背包 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:31

    dataGridView1.Rows[dataGridView1.Rows.Count - 1].Selected = true;
    

提交回复
热议问题