I have a Rad Tree control within a user control, which when I run renders as a bulleted list and only shows the first (parent) nodes and not the child nodes!
I am not sure what is causing this, as when I use the same Rad Tree in a normal page it works and looks fine.
I would really appreciate if someone can help me on this one.
Tahir
5 Answers, 1 is accepted
I suggest you add the following link tags to the <head> section of your page:
<link href="RadControls/TreeView/Skins/[SKIN_NAME]/styles.css" rel="stylesheet" type="text/css" /> |
<link href="RadControls/TreeView/Scripts/[VERSION]/treeview.css" rel="stylesheet" type="text/css" /> |
Here [SKIN_NAME] and [VERSION] should be replaced with the corresponding - Name of the skin currently in use and the version of the control.
I hope this helps.
Best wishes,
Simon
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
I am sorry, I think I have posted this in the wrong forum. Actually I am using the prometheus tree control. I have not added anything (yet) in the RadControls folder for tree control.
Tahir
Most probably you are using User Control with Output Cache and that is why the skins and scripts of the RadTreeView are not loaded. You should manually reference them in the main page, where the User Control is located, in order to successfully workaround the problem.
Please follow the steps bellow to do this:
- Copy the Skins and Scripts directories from RadControls "Prometheus" installation directory to your project directory (you could delete all subdirectories in Scripts, except 'Common' and 'TreeView', as well as all skin files in Skins, except those for TreeView);
- Link the two skin files of the RadTreeView: put the following lines in the <head> tag of your page:
<link href="~/Skins/TreeView.css" rel="stylesheet" type="text/css" /> <link href="~/Skins/Default/TreeView.Default.css" rel="stylesheet" type="text/css" /> - Finally, modify the ScriptManager instance on your main page like this:
<asp:ScriptManager ID="ScriptManager1" runat="server"> <Scripts> <asp:ScriptReference NotifyScriptLoaded="true" Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" Path="~/Scripts/Common/Core.js" /> <asp:ScriptReference NotifyScriptLoaded="true" Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Animation.AnimationScripts.js" Path="~/Scripts/Common/Animation/AnimationScripts.js" /> <asp:ScriptReference NotifyScriptLoaded="true" Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Navigation.NavigationScripts.js" Path="~/Scripts/Common/Navigation/NavigationScripts.js" /> <asp:ScriptReference NotifyScriptLoaded="true" Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.TreeView.RadTreeViewScripts.js" Path="~/Scripts/TreeView/RadTreeViewScripts.js" /> </Scripts> </asp:ScriptManager>
Please see the attached project for reference.
I hope this helps.
Regards,
Simon
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Is there another way to resolve this issue besides manually registering the CSS and the scripts to get this to work??
I have a RadTreeView that's nested inside of a RadComboBox on a user control (set as a editing form inside of a RadGrid). All of this is inside a Master/ContentPage schema. The grid and user control is repeated in multiple pages on my site and the treeview renders perfectly.. except in one scenario:
I have another instance of this nested treeview, inside of a combo box, inside of a user control, inside of a grid on another user control within a RadDock that is ajaxified. I have not defined output caching on any of the user controls. I believe the difference is because of the added child of this usercontrol inside of the RadDock which is interferring with the skin I'm trying to use.
I do not want to manually register the CSS and scripts for this since it works in 95% of my site already and I hate to load the CSS/JS from my master page for every page when it already works the majority of the time.
Do you have any other suggestions?
http://www.telerik.com/community/forums/aspnet-ajax/treeview/radtreeview-for-asp-net-ajax-not-rendering-properly.aspx#2662287
HTH
Cheers,
-Aarsh