I have some code that has been working for a while, where I do stuff mostly on the client side (drag drop/delete/edit). I process the client transactions saved in the ClientChanges collection on the server when a Save button is clicked I had a need to add code to a context menu to allow adding a child to a selected node. I specifically needed to have the node show up in edit mode right away for the user to add the node text. I couldn't get this to work on the client side, so I saw a server side sample on your website that does exactly what I needed (right click on node and select 'new folder' in context menu http://demos.telerik.com/aspnet-ajax/treeview/examples/functionality/contextmenu/defaultcs.aspx).
So I added the onContextMenuItemClick server event to the .aspx (line 3 below)
<telerik:RadTreeView ID="tvwCategory" runat="server" EnableDragAndDrop="true" EnableDragAndDropBetweenNodes="true" AllowNodeEditing="true" OnClientNodeDropping="onNodeDropping" OnClientContextMenuItemClicked="onClientContextMenuItemClicked" | |
OnClientNodeEdited="onClientNodeEdited" onprerender="tvwCategory_PreRender" | |
oncontextmenuitemclick="tvwCategory_ContextMenuItemClick"> |
And I of course add the corresponding code to the .aspx.cs for this method just as in the example. This works great. But now my code that processes client side changes for Drag and Drop is not working any more. The client side delete and edit transactions still appear correctly in the ClientChanges collection, but transactions related to Drag and Drop are not there anymore. If I remove the server side onContextMenuItemClick event code from the .aspx and .aspx.cs, then the Drag and Drop code works again!
What is happening here? How to fix/ work around it? I am using version 2008.3.1125.20