TreeView UserCtrl in SF RC 4.0
HI,
I'm using a tree view control in a user control. When I drag the User Control to my SiteFinity page it gives the error below :
Exception of type : System.Web.HttpUnhandledException was thrown.
BUT WHen I Preview the page the Tree View Control appears in the screen just fine.
Is there a way to remedy the error above so the TreeView appears in the screen on the SiteFinity page instead of the error message?
By the way there is no code for this. Its just a Tree View with one node. So the error is not code related.
Hi Jon,
Can you paste the control you use?
Kind regards,
Ivan Dimitrov
the Telerik team
Hi Ivan,
Once again, I have a TreeView control on a User Control. When I go to 'Pages' in SiteFinity and select my page, drag the registered User Control to a page it gives me an error on the control. However, when I preview the page it self the Tree View shows up fine. I think there is a problem with multiple script managers on the SIteFinity page. My TreeView has a scriptmanager as well. If I take away the script manager and use Sitefintys script manager the tree will not display properly on the page in design view. I hope I"m making sense.
Is there a way to have my tree view have a script manager and display properly in the page in Sitefinity ?
Can you paste the control you use ?
Yes, I'm pasting the code for the tree view control onto the User Control. I'm not dragging the control. My previous post talks about script managers. Its a problem with SiteFinitys script managers. Please see my post.
Thanks
jon\
Hi Jon,
In your first post you did not indicate that you have a script manager on the page. This is why asked for the control. Of course in ASP.NET you cannot have two ScriptManager controls on the same page.
The ScriptManager is automatically injected on built-in templates and templates created with the template designer within Sitefinity 4.0. If you are using master pages for base of your templates you need to add the ScriptManager control in the markup. We add ASP.NET ScriptManager control on the page if you have not declared it in the control or your template.
Best wishes,
Ivan Dimitrov
the Telerik team
Hi Ivan,
I understand all of the above however, if I leave a script manager control out of my page the tree will not display properly. This is how to repeat the problem:
1. Create a user control
2. Add tree view to user control ( must have child items in tree view ) with no script manager
3. register control in SiteFinity
4. drag user control to a Sitefintiy page.
The children items in the Tree View will not display. Just the text of the root node is displayed. Is there a way to fix this problem ?
This is my code in my user control .. simple
<
telerik:RadTreeView
ID
=
"RadTreeView1"
Runat
=
"server"
></
telerik:RadTreeView
>
RadTreeView1.Nodes.Add(new RadTreeNode("Testing"));
RadTreeNode rad1 = new RadTreeNode("TestTree");
rad1.Nodes.Add(new RadTreeNode("1"));
rad1.Nodes.Add(new RadTreeNode("2"));
RadTreeView1.Nodes.Add(rad1);
HI Ivan,
I have figured it out. When you drag your user control which contains a tree view to a SiteFinity page you have to manually refresh the page for the Tree View to display properly. You should not have to do this and I'm guessing theres no work around for this ...
jon
Hi Jon,
I created the same control as you pasted and the RadTreeView renders correctly. Again, I cannot see any issues with the control or the way that it is rendered on the page.
Regards,
Ivan Dimitrov
the Telerik team