DataGridView without selected row at the beginning

后端 未结 12 1097
栀梦
栀梦 2021-02-12 14:23

In my WinForms I have DataGridView. I wanted to select full row at once so I set SelectionMode as FullRowSelect. And now I have problem, b

12条回答
  •  一个人的身影
    2021-02-12 14:57

    You should try to put in Shown event datagridView.ClearCelection() and also datagridView.CurrentCell=null and for example if you want to select row for deleting or changing informations just do if(datagridView.CurrentCell==null){ MessageBox.Show("You must select row");} it works for me

提交回复
热议问题