I have a RadTreeView with top nodes and each top node may have children (subnotes) depending on my database data source.
Top node 1
|___ Sub node 1
|___ Sub node 2
|___ Sub node 3
Top node 2
|___ Sub node 1
|___ Sub node 2
|___ Sub node 3
|___ Sub node 4
Top node 3
|___ Sub node 1
I have consigured all my top nodes to have a ContextMenu (radContextMenu1) associated with it.
For all the Sub notes of any top node (so for Sub node 1, 2, 3 of Top node 1; Sub node 1, 2, 3, 4 of Top node 2 and Sub node 1 of Top node 3 and any other subsequent Sub note of any other possible Top node), I want a context menu (radContextMenu2) to appear and I want to do this through C# code, not at design time.
The only example that you seem to provide is how to acomplish this at design time and only with predefined nodes; not database driven ones, like mine.
Here is the only example that you provide:
RadTreeView1.Nodes[0].ContextMenu = radContextMenu2;
This will NOT work in my case since my menu is constantly changing based on my dasaset.
In essence, I am looking for something like this:
RadTreeView1.AllSubNodesAtLevel[0].ContextMenu = radContextMenu2;
(where level 0 would be ALL the Sub nodes in the above pictured schema)
Thank you!
Top node 1
|___ Sub node 1
|___ Sub node 2
|___ Sub node 3
Top node 2
|___ Sub node 1
|___ Sub node 2
|___ Sub node 3
|___ Sub node 4
Top node 3
|___ Sub node 1
I have consigured all my top nodes to have a ContextMenu (radContextMenu1) associated with it.
For all the Sub notes of any top node (so for Sub node 1, 2, 3 of Top node 1; Sub node 1, 2, 3, 4 of Top node 2 and Sub node 1 of Top node 3 and any other subsequent Sub note of any other possible Top node), I want a context menu (radContextMenu2) to appear and I want to do this through C# code, not at design time.
The only example that you seem to provide is how to acomplish this at design time and only with predefined nodes; not database driven ones, like mine.
Here is the only example that you provide:
RadTreeView1.Nodes[0].ContextMenu = radContextMenu2;
This will NOT work in my case since my menu is constantly changing based on my dasaset.
In essence, I am looking for something like this:
RadTreeView1.AllSubNodesAtLevel[0].ContextMenu = radContextMenu2;
(where level 0 would be ALL the Sub nodes in the above pictured schema)
Thank you!