ServerSide Node Expand not working

5 posts, 0 answers
  1. Satish
    Satish avatar
    3 posts
    Member since:
    Oct 2014

    Posted 19 Feb 2015 Link to this post

    Hi,

    I have the following scenario.

    Creating Treeview Control in .aspx file as follows:

                                <telerik:RadTreeView ID="WinFabExplorerMenu" runat="server" OnNodeExpand="WinFabExplorerMenu_NodeExpand" OnClientNodeClicked="ClientNodeClicked">
                                </telerik:RadTreeView>

    On client side, adding node to the tree and set expand mode to server side call back. After this, when I clicked the + sign on the node, the server side node expand event not firing.

    function OnFederationTileClicked(sender, args) {
        $('#collapseOne').collapse('hide');
        var tree = $find("ctl00_MainContent_WinFabExplorerMenu");
        tree.trackChanges();
        tree.get_nodes().clear();
        var node = new Telerik.Web.UI.RadTreeNode();
        node.set_text(sender.get_navigateUrl());
        node.set_category('Root');
        node.set_expanded(false);
        var attributes = node.get_attributes();
        attributes.setAttribute("Federation", sender.get_navigateUrl());
        attributes.setAttribute("Path", "Test");
        node.set_expandMode(Telerik.Web.UI.TreeNodeExpandMode.ServerSideCallBack);
        node.set_postBack(true);
        tree.get_nodes().add(node);
        tree.commitChanges();
    }
  2. Satish
    Satish avatar
    3 posts
    Member since:
    Oct 2014

    Posted 20 Feb 2015 in reply to Satish Link to this post

    Can someone reply to this?

    Thanks
    Satish

     

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Nencho
    Admin
    Nencho avatar
    1457 posts

    Posted 24 Feb 2015 Link to this post

    Hello Satish,

    I have investigated the described issue further and it seems like a bug. In order to overcome this behavior, you could add one Node statically in the markup and set its Visible property to false. Please consider the below implementation :
    <telerik:RadTreeView ID="WinFabExplorerMenu" runat="server" OnNodeExpand="WinFabExplorerMenu_NodeExpand">
               <Nodes>
                   <telerik:RadTreeNode ExpandMode="ServerSideCallBack" Visible="false"></telerik:RadTreeNode>
               </Nodes>
           </telerik:RadTreeView>

    In addition, I have already forwarded this issue to our developer team.

    Regards,
    Nencho
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  5. Kenni
    Kenni avatar
    2 posts
    Member since:
    Mar 2015

    Posted 26 Mar 2015 Link to this post

    The solution posted does not work. Will this issue be fixed?

    Until it is fixed the only alternative appears to be to use OnNodeClick instead.
  6. Kenni
    Kenni avatar
    2 posts
    Member since:
    Mar 2015

    Posted 26 Mar 2015 Link to this post

    The solution posted doesn't work for me.

    Until the bug is fixed the only option appears to be using OnNodeClick rather than OnClientNodeClicked.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017