Hello!
Does anybody knows how to unselect ALL the rows on a Windows Forms DataGrid control, using C#? By default, the first row is always selected... Also, I don't want to allow any kind of selection; do you guys know any method to this?
I've already searched here but can't find...
Any help would be great!
Cheers!
Edit:
Ok, i've found another way to unselect a row; on the DataGridViewRow.RowPostPaint()
event, use the Selected
property to unselect the row who send the event.
private void grid_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
{
this.gridLogEntries.Rows[e.RowIndex].Selected = false;
}