On Node Click Issue

3 posts, 0 answers
  1. Thomas
    Thomas avatar
    3 posts
    Member since:
    May 2014

    Posted 17 Jun 2014 Link to this post

    Hi guys,
    I have node editing enabled on my treeview. Is there any way to disable editing on clicking the node itself.
    I have editing working as standard and with a button at the moment but I want it working with the button only.
    Thanks,
    Tommy
  2. Thomas
    Thomas avatar
    3 posts
    Member since:
    May 2014

    Posted 17 Jun 2014 in reply to Thomas Link to this post

    Solution:
    var tree = $find("<%= RadAroTreeManager.ClientID %>");
            var nodes = tree.get_selectedNodes();
            for (var i = 0; i < nodes.length; i++) {
                nodes[i].startEdit();
            }
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 17 Jun 2014 in reply to Thomas Link to this post

    Hi Thomas,

    Please try the sample code snippet to edit the node on Button client click.

    ASPX:
    <telerik:RadTreeView ID="rtreeviewNodeEdit" runat="server">
        <Nodes>
            <telerik:RadTreeNode Text="Node1">
            </telerik:RadTreeNode>
            <telerik:RadTreeNode Text="Node2">
            </telerik:RadTreeNode>
        </Nodes>
    </telerik:RadTreeView>
    <telerik:RadButton ID="rbtnNodeEdit" runat="server" Text="Edit Selected Node" AutoPostBack="false" OnClientClicked="EditNode">
    </telerik:RadButton>

    JavaScript:
    function EditNode(sender, args) {
        var treeView = $find("<%=rtreeviewNodeEdit.ClientID%>");
        treeView.get_selectedNode().startEdit();
    }

    Thanks,
    Princy.
Back to Top