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

RadTreeView

3 Answers 89 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Wilberto Cordero
Top achievements
Rank 1
Wilberto Cordero asked on 07 Dec 2016, 11:49 AM

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

3 Answers, 1 is accepted

Sort by
0
Peter Milchev
Telerik team
answered on 12 Dec 2016, 09:24 AM
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.
0
Rone
Top achievements
Rank 1
answered on 13 Oct 2017, 09:45 AM

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.

0
Peter Milchev
Telerik team
answered on 18 Oct 2017, 01:42 PM
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.
Tags
TreeView
Asked by
Wilberto Cordero
Top achievements
Rank 1
Answers by
Peter Milchev
Telerik team
Rone
Top achievements
Rank 1
Share this question
or