Im using TreeApp2 project to build a tree structure for all the employees of an organization, each node displaying an employee. Employees working under other employees are being displayed as child nodes for that node. This is working fine. My requirement is, when the user right-clicks on any node I want to display the Context Menu for that node. I tried but I cannot display it for the node. Can you help me out?
Yes, Im overriding the method. This is the code that I have written.
public override GoContextMenu GetContextMenu(TreeAppView view)
{
GoContextMenu cm = new GoContextMenu(view);
cm.MenuItems.Add(new MenuItem("City", new EventHandler(this.City_Command)));
cm.MenuItems.Add(new MenuItem("Department", new EventHandler(this.Dept_Command)));
return cm;}
The error msg is : 'TreeApp.Form1.GetContextMenu(TreeApp.TreeAppView)': no suitable method found to override