Disable Right click in DataGrid

ganapathi

Member
Joined
Jul 27, 2004
Messages
14
Programming Experience
1-3
Hi All,

I've populated a datagrid and made it as a read only. I've a context menu assigned to the grid. When i click on a cell and right click on the same cell, then the default textbox's right click menu option (Cut/Copy/Paste) is comming. How do i disable that and make my context ment to appear?

Can any one help on this????

Regards,
Ganapathi
 
An odd, and most likely not the best solution is to use the x/y coordinate system to disable the context menu. then set the mouse down event to mean the right mouse button and do nothing.

handles mybase.mousedown
if e.x = area of grid and e.y area of grid then
disable context menu

Sorry,,, I am new and use a book, but I have used this for similiar solutions
 
Thanks for your suggessions.

I've found another way to do this. That is i'm disabling the textboxes in the grid through the datagrid column style object. This disables all the cells but not the grid. so my popup menu is displaying.
 
Back
Top