Selecting a new cell in a DataGridView

  • Thread starter Thread starter Dom
  • Start date Start date
D

Dom

I posted this before, no takers. Trying again.

Is there anyway to cancel the selection of a new cell in a
DataGridView? For example, if the user selects a cell with the
control key down, then I don't want the selection to change.

Dom
 
Well, I decided to answer this question myself, since none of you
lunkheads seems to know how to do this.

I created MyDataGridView, which extends DataGridView and overrides the
OnMouseDown event handler. This new handler fires off two events,
MouseDownPrep and base.OnMouseDown, but the second event only fires if
the result of the first event okays it.

I guess that's the only way.

Dom
 
There's nothing that makes people here want to help you more than being
insulted.

RobinS.
---------------------------------------------
Well, I decided to answer this question myself, since none of you
lunkheads seems to know how to do this.

I created MyDataGridView, which extends DataGridView and overrides the
OnMouseDown event handler. This new handler fires off two events,
MouseDownPrep and base.OnMouseDown, but the second event only fires if
the result of the first event okays it.

I guess that's the only way.

Dom
 
Back
Top