I\'d like to deselect all selected rows in a DataGridView control when the user clicks on a blank (non-row) part of the control. How can I do this?
DataGridView
Thanks Cody heres the c# for ref:
if (e.Button == System.Windows.Forms.MouseButtons.Left) { DataGridView.HitTestInfo hit = dgv_track.HitTest(e.X, e.Y); if (hit.Type == DataGridViewHitTestType.None) { dgv_track.ClearSelection(); dgv_track.CurrentCell = null; } }