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

treeViewNode set_visible(false) is not persisted on postback

1 Answer 10 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Craig
Top achievements
Rank 1
Craig asked on 14 Aug 2014, 05:15 PM
can anyone suggest a way of persisting the visiblilty of a node after postback.

I am using javascript to node.set_visible(false) and using a tree.trackChanges() and tree.commitChanges() around my code...

All other settings such as enabled/disabled and css styles are honoured on each node... but this setting does not seem to be... am I missing something?

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 1
answered on 18 Aug 2014, 03:48 AM
Hi Craig,

Please have a look into the sample code snippet which works fine at my end. Please provide your code if it doesn't help.

ASPX:
<telerik:RadTreeView ID="rtreeviewHideNode" runat="server">
    <Nodes>
        <telerik:RadTreeNode Text="Node1" runat="server">
        </telerik:RadTreeNode>
        <telerik:RadTreeNode Text="Node2" runat="server">
        </telerik:RadTreeNode>
    </Nodes>
</telerik:RadTreeView>
JavaScript:
function pageLoad() {
    var treeView = $find("<%=rtreeviewHideNode.ClientID%>");
    treeView.findNodeByText("Node2").set_visible(false);
}

Thanks,
Shinu.
Tags
TreeView
Asked by
Craig
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 1
Share this question
or