JohnRia
asked on
Control a context menu in datagrid
Hello,
I have a context menu in a datagrid and it has several options on it, such as:
Add
Edit
Delete
Move
Print
Cancel
I only want the options to be available if the right click is in the rowheader area of the datagrid. I would then like to select the row the user is pointing at and process the request, unless they already have multiple rows selected, then I would liek ot process all the selected rows. I am having trouble figuring out how to get thing to happen in the correct sequence. If I use the mouse up event of the dg and change the menu items to enabled they do not show up until the next right click. How do I go about doing this?
I have a context menu in a datagrid and it has several options on it, such as:
Add
Edit
Delete
Move
Cancel
I only want the options to be available if the right click is in the rowheader area of the datagrid. I would then like to select the row the user is pointing at and process the request, unless they already have multiple rows selected, then I would liek ot process all the selected rows. I am having trouble figuring out how to get thing to happen in the correct sequence. If I use the mouse up event of the dg and change the menu items to enabled they do not show up until the next right click. How do I go about doing this?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Glad you liked it!
Alex :p
ASKER
JohnRia