Link to home
Start Free TrialLog in
Avatar of kiranboi
kiranboi

asked on

How Can I Cancel a Mouse Click

Hi all,

I have a DataGridView in my app and I want it to ignore any mouse clicks on it but the e args doesnt allow me to use cancel.
Can someone let me know a way around this.

Thanks
Avatar of wsh2
wsh2

If you do not want any user interaction with the DataGridView.. just set it's Enabled property to False.
Avatar of kiranboi

ASKER

I still want the user to be able to interact with the control, just not by using the mouse
How About setting the DataGridView to Enabled = False when the MouseOver Event is fired and Enabled = True on MousLeave
If you don't mind me asking, What exactly are you trying to prevent the user from doing?

If you allow them to edit a cell, are you trying to make them tab to it, rather than just clicking on the cell
to edit it?  Or are you trying to prevent something specific, like resizing columns and rows, etc.?

i want them to fill in the grid one row at a time and not be able to select a cell (other than in column 0 in the next row) on a row that has not yet been used.
ASKER CERTIFIED SOLUTION
Avatar of VBRocks
VBRocks
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial