This is a migrated thread and some comments may be shown as answers.

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

2 Answers 43 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Johann
Top achievements
Rank 1
Johann asked on 04 Dec 2008, 02:02 PM
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 Answers, 1 is accepted

Sort by
0
Mallverkstan
Top achievements
Rank 2
answered on 04 Dec 2008, 03:42 PM
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
0
Johann
Top achievements
Rank 1
answered on 04 Dec 2008, 03:56 PM
cool thanks

that worked!
Tags
TreeView
Asked by
Johann
Top achievements
Rank 1
Answers by
Mallverkstan
Top achievements
Rank 2
Johann
Top achievements
Rank 1
Share this question
or