get the "renamed" node value from c# code behind

3 posts, 0 answers
  1. Johann
    Johann avatar
    13 posts
    Member since:
    Sep 2008

    Posted 04 Dec 2008 Link to this post

    Dear All,

    I have a context menu in a TreeView, and one of the options is to rename the title.  that is working fine, i am doing this

            function onClientContextMenuItemClicked(sender, eventArgs)
            {
                var menuItem = eventArgs.get_menuItem();
                var treeNode = eventArgs.get_node();

                switch(menuItem.get_value())
                {
                    case "View":
                        break;
                    case "Edit":
                        break;
                    case "Rename":
                        treeNode.get_treeView()._startEdit(treeNode);
                        break;
                    case "New":
                        break;
                    case "Delete":
                        break;
                }
            }

    Now I noticed that after changing the treeNode, I am going back to the Page_Load in C#.  From that pageLoad, I want to check if the treeNode was changed, and if changed, get the value, so that I can update the database with that value.

    Is this possible to do from the C# code-behind?

    Thanks for your help
  2. Mallverkstan
    Mallverkstan avatar
    20 posts
    Member since:
    May 2007

    Posted 04 Dec 2008 Link to this post

    You can catch it by setting the event OnNodeEdit="HandleNodeEdit" in the RadTreeView.

    and in code behind:
    protected void HandleNodeEdit(object sender, RadTreeNodeEditEventArgs NodeEvents) {
    }

    Regards,
    Fredrik
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Johann
    Johann avatar
    13 posts
    Member since:
    Sep 2008

    Posted 04 Dec 2008 Link to this post

    cool thanks

    that worked!
Back to Top