Reputation:
In my program, I have a DataGridView form and with it I want the user to select the whole row, but disable single cell selection.
I tried to handle the SelectionChanged event, checking to see if the selectedRows.Count is greater than zero, and if it is true clearing the selection and outputting a message. The issue is that the event gets fired more than once for each click.
Upvotes: 1
Views: 87
Reputation: 2701
Change the SelectionMode of your DataGridView (in Properties) to FullRowSelect.
Upvotes: 0