|
Rank: Advanced Member Groups: Member
Joined: 8/24/2007 Posts: 130
|
Hi,
I have a tree view that comprises of a number of different node types. I create a context menu programatically for each node type and add them to a place holder control. I handle the context menu item click event server side. This is all working fine. The problem I have is that I do not have any tree view node context in NavigationItemEventArgs when handling the menu click server side. I have tried to add this context information to the Value field of the menu items in the client side context menu handler, and although this is successful on the client side, it does not get carried across to the server side handler.
I am really stuck here. The only solution I can see is to create a different context menu for each treeview node, and this would be highly inefficient!
Regards
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
You should definitely use the TreeView client side context menu handler for obvious performance reason. There are various ways to carry information back to the server side. You can either use a hidden input element or our callback control. Either way you need to handle the context menu's ClientSideOnItemClick to set the value of the input element or calling eo_Callback.
Thanks
|
|
Rank: Advanced Member Groups: Member
Joined: 8/24/2007 Posts: 130
|
Not sure I understand this correctly. If I use the context menu's ClientSideOnItemClick to set the value of the input element or calling eo_Callback, I don't seem to have the tree view node context at this point. It still doesn't get me out of the situation.
I can see, however, that this solution might work if I set the value of the input element in ClientSideOnContextMenu handler. I will give this a go.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
You can do it at either place. For example, you can save the tree view node context information in a global variable and then use it later inside the context menu's clientSideOnItemClick.
Thanks
|
|