The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
If I have a popup menu associated with multiple treeview controls, how do I determine which control was the one that the menu selection occurred on. And is it also possible to determine the actual node, or do I need to select the node first and just use the selectednode property?
ADAdministrator Syncfusion Team November 27, 2002 05:13 PM UTC
Chuck,
You ca use the PopupMenu.SourceControl to determine on which TreeView the context menu was shown.
And yes, please select the node on mouse down, as follows:
private void treeView1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
{
if(e.Button == MouseButtons.Right)
{
treeView1.SelectedNode = treeView1.GetNodeAt (e.X ,e.Y );
}
}
and then use the SelectedNode property.
Regards,
Praveen Ramesh