RadTreeView

4 posts, 0 answers
  1. Wilberto Cordero
    Wilberto Cordero avatar
    1 posts
    Member since:
    Sep 2009

    Posted 07 Dec 2016 Link to this post

    Hello!!

    I have an app in C# that contain report viewer for many reports. One of my reports has a RadTreeView. I want to submit this report to my app. the treeView get all elements (I can see it while debugging) but I can't show it on report viewer. The report show others control but the RadTreeView not appear

  2. Peter Milchev
    Admin
    Peter Milchev avatar
    505 posts

    Posted 12 Dec 2016 Link to this post

    Hello Wilberto,

    Would you please elaborate more on the scenario. What kind of report viewer are you using, is the selected product, RadTreeView for ASP.NET AJAX, from the correct suite? 

    We would greatly appreciate it if you could provide us a very simplified sample runnable project that implements your scenario and reproduces the issue. Thus, we would be able to investigate locally and help you more efficiently.

    Regards,
    Peter Milchev
    Telerik by Progress
    Telerik UI for ASP.NET AJAX is ready for Visual Studio 2017 RC! Learn more.
  3. Rone
    Rone avatar
    1 posts
    Member since:
    Feb 2017

    Posted 13 Oct 2017 Link to this post

    Hello.

    My project is using RadTreeView control as a navigation menu on a master page.  The node items basically only have two levels of RadTreeNodes where the first level as the parent node (as text) and its child nodes contain anchor tags referencing aspx pages.  When a node (menu) is click, the whole page posts back.  What I would like to happen is even if after page posts back, I would like the selected node's parent node to be expanded and the rest of the parent and child nodes are collapsed (not selected or previously selected).  By the way, each node's content are statically coded on the master page (*.master file).

     

    I appreciate any help you can provide.

     

    Thank you.

  4. Peter Milchev
    Admin
    Peter Milchev avatar
    505 posts

    Posted 18 Oct 2017 Link to this post

    Hello Rone,

    One option is to use the OnNodeClick server-side event, to collapse all nodes and then expand only the desired one and its parents as demonstrated in the attached project. 

    <telerik:RadTreeView runat="server" ID="RadTreeView1" OnNodeClick="RadTreeView1_NodeClick">
    protected void RadTreeView1_NodeClick(object sender, Telerik.Web.UI.RadTreeNodeEventArgs e)
    {
        var treeview = sender as RadTreeView;
        treeview.CollapseAllNodes();
        e.Node.ExpandParentNodes();
        e.Node.Expanded=true;
    }

    Here are some resources that should help you achieve the desired functionality: 
    Regards,
    Peter Milchev
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top