How do I prevent OnMouseUp in a DataGrid

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a derived DataGrid class that overrides the OnMouseUp event so that I
can highlight multiple cells for cut/copy/paste functionality. When the user
selects to open a new file via a OpenFileDialog dialog, the OnMouseUp event
for the grid is called after the user presses the Open button on the
OpenFileDialog dialog. Is there a way to prevent this event from being
passed down to the grid level? It should just call the OpenFileDialog
OnMouseUp event handler, not my grid event handler too.

Thanks,

Scott
 
Sorry about the double posting... Microsoft threw an exception saying that my
message was not received and wouldn't be posted, but then they posted it
anyways....lovely UI there MS.
 
Scott said:
I have a derived DataGrid class that overrides the OnMouseUp event so that I
can highlight multiple cells for cut/copy/paste functionality. When the user
selects to open a new file via a OpenFileDialog dialog, the OnMouseUp event
for the grid is called after the user presses the Open button on the
OpenFileDialog dialog. Is there a way to prevent this event from being
passed down to the grid level?

I don't know if the mouseup can be prevented. You could also override
OnMouseDown. Only process OnMouseUp if you received a corresponding
OnMouseDown.

H^2
 
Yeah, that's the work around that I've implemented. I'd like to be able to
prevent it from being called if possible, though.

Thanks,

Scott
 
Back
Top