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
You can call dataGridView.ClearSelection() method inside form_Load event like this...
private void Form1_Load(object sender, EventArgs e)
{
// You will get selectedCells count 1 here
DataGridViewSelectedCellCollection selectedCells = dataGridView.SelectedCells;
// Call clearSelection
dataGridView.ClearSelection();
// Now You will get selectedCells count 0 here
selectedCells = dataGridViewSchedule.SelectedCells;
}