0

Could someone tell me how to go about this? I've a dataGrid and when a user right-click on one of the row's header I want a context menu pop-up with the menu choices "View Detail", "Cancel". Thanks in advance...

2
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by nicewave
0

I quickly did a serach and found a bunch of stuff. Below is the link at the top of the search. Seems like what you may be looking for. Click Here

0

I have the following code, but it kept giving error the name 'MakeActive' is not exist in the current context. Could someone tell me what I did wrong? Thanks.

//Define different context menus for different columns
private ContextMenu contextMenuForColumn1 = new ContextMenu();

Add the following line of code in the form load event:
private void Form_Load(object sender, EventArgs e)
{
// Load all default values of controls
populateDataGridView();

// Add context mneu items
contextMenuForColumn1.MenuItems.Add("Make Active", new EventHandler(MakeActive));

}

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.