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

Client side changes not persisting

1 Answer 69 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Phani Alla
Top achievements
Rank 1
Phani Alla asked on 09 Sep 2009, 07:41 PM
Hello,

I'm trying to integrate RadToolTip with RadTreeView, The user can choose to enter a new column name in the tooltip and on a button click the tool tip, the treeView node name would be updated. I'm using a UserControl to display the controls in the tool tip. 
The button click event on the tooltip user control calls an UpdateNodeName method on the client side, which does the update on the nodename...I've used treeview.trackChanges() and commitChanges(), but the changes are lost on postback. 
 protected void btnAddColumn_Click(object sender, EventArgs e) 
        { 
            string sType = NodeName.Substring(NodeName.IndexOf('(') + 1, NodeName.IndexOf(',') - (NodeName.IndexOf('(') + 1)); 
            NodeName = txtColumnName.Text + "(" + sType + "," + txtLength.Text + ")"; 
            string strScript = string.Empty; 
            strScript += "UpdateNodeName('" + NodeID + "','" + NodeName + "','" + txtLength.Text + "','"+BaseID+"');"; 
            ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "WebUserControlScript", "CloseActiveToolTip();" + strScript, true); 
        } 
 function UpdateNodeName(nodeID, nodeName, attLength, selTreeID) { 
    
    var SelectedTree = $find(selTreeID); 
    if (SelectedTree != null) { 
        SelectedTree.trackChanges(); 
        var RootNode = SelectedTree.get_nodes().getNode(0); 
        if (RootNode != null) { 
            var Node = FindNodeByNodeID(RootNode, nodeID); 
            if (Node != null) { 
                //Node.get_treeView().trackChanges(); 
                Node.set_text(nodeName); 
                SelectedTree.commitChanges(); 
                Node.get_treeView().trackChanges(); 
                Node.get_attributes().setAttribute("attlength", attLength); 
                Node.get_treeView().commitChanges(); 
            } 
             
            //Node.get_treeView().commitChanges(); 
        } 
        
    } 

I would appreciate any help with this problem,

Thank you,
Phani

1 Answer, 1 is accepted

Sort by
0
Accepted
Yana
Telerik team
answered on 14 Sep 2009, 11:43 AM
Hello Phani,

Please try to isolate the problem in a small runnable project and send it to us so we could test it. You should open a support ticket in order to be able to attach files. Thanks in advance

Best wishes,
Yana
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
TreeView
Asked by
Phani Alla
Top achievements
Rank 1
Answers by
Yana
Telerik team
Share this question
or