>Hello all ,
>
>I am trying to use the right click menu shortcut to display an .mpr file in my grid ,
>however it won't work if i give it in the right click method of the grid.
>
>However it works in the column method of the grid.
>Does it mean that I have to give the same code of execution in all the columns of the grid. That
>would be a sad way of doing.
>
>I am sure there is some tip out there , do let me know all the experts.
>
>Ajay Sanghani
>WinSmart Solutions
>Building Software Better and Faster
>
http://www.winsmart.com>
>email : ajay@winsmart.com
Jay,
The right click event is trapped by the object that the it occurs over. In the case of a grid it is the columne or even the control within the column that will get the event.
I would suggest that you put your short cut menu code in the grid's right click event and then in the columns and the controls within the columns you put this in the rightclick;
THIS.Parent.RightClcik()
This will delegate the rightclick event to each object's parent, in the case of a control in a column the delegation is to the column and in teh column it is deleagted to teh grid. This approach keeps all of the code to manage the short cut menu in the gird's rightclick code while the rightclick event is handled by the object that it occured over.