This question is locked. New answers and comments are not allowed.
Hi,
I have binded the treeview as following. Showlines() doesn't show any lines in treeview and expand\collapse image also dont come up. Please help
I have binded the treeview as following. Showlines() doesn't show any lines in treeview and expand\collapse image also dont come up. Please help
<%
= Html.Telerik().TreeView()
.Name("TreeView1")
.ShowLines(true)
.ShowCheckBox(true)
.ClientEvents(events => events
.OnChecked("onChecked")
.OnLoad("onLoad")
)
.BindTo(SiteMap.Provider.RootNode.ChildNodes, mappings =>
{
mappings.For<SiteMapNode>(binding => binding
.ItemDataBound((item, navitem) =>
{
item.Text = navitem.Title;
item.Value = navitem.Description;
if (item.Parent == null)
{
item.Checkable = false;
}
if(ViewData["Fn_Id"] != null && item.Value.Contains(ViewData["Fn_Id"].ToString()))
{
item.Checked = true;
item = item.Parent;
while(item!=null)
{
item.Expanded = true;
item = item.Parent;
}
}
})
.Children(navitem => navitem.ChildNodes)
.Children(childitem => childitem.ChildNodes));
})
%>
7 Answers, 1 is accepted
0
Lasse
Top achievements
Rank 1
answered on 25 Apr 2012, 02:25 PM
0
Hello,
It looks like the skin images and / or the skin stylesheet are not loaded.
Greetings,
Dimo
the Telerik team
It looks like the skin images and / or the skin stylesheet are not loaded.
Greetings,
Dimo
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now.
0
Ross
Top achievements
Rank 1
answered on 28 May 2012, 05:55 PM
I believe there is a bug in the TreeView. When I explicitly set ShowLines(false), I see that showLines:false is included in the jQuery initialization script. However if I explicitly set ShowLines(true), then showLines:true is not included in the initialization script.
I can see that WriteInitializationScript() method does the following:
I can see that WriteInitializationScript() method does the following:
if (!this.ShowLines)
objectWriter.Append("showLines", this.ShowLines);
objectWriter.Append("showLines", this.ShowLines);
0
Hi Ross,
Properties with default values are not serialized, because this is not necessary. Is there a problem with the component functionality?
Regards,
Dimo
the Telerik team
Properties with default values are not serialized, because this is not necessary. Is there a problem with the component functionality?
Regards,
Dimo
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now.
0
Ross
Top achievements
Rank 1
answered on 29 May 2012, 03:00 PM
Ah, I thought that the default behaviour was to not show lines, but it sounds like you are saying that the default is to show lines. I can't get the lines to appear at all. Furthermore the lines do not appear in any of the online demos:
http://demos.telerik.com/aspnet-mvc/treeview
Thanks,
Ross.
http://demos.telerik.com/aspnet-mvc/treeview
Thanks,
Ross.
0
Hello Ross,
Some themes are designed to resemble other existing themes (e.g. Windows Vista operating system) and the TreeView does not have lines at all. However, you can use a skin that has them, for example:
http://demos.telerik.com/aspnet-mvc/treeview?theme=simple
All the best,
Dimo
the Telerik team
Some themes are designed to resemble other existing themes (e.g. Windows Vista operating system) and the TreeView does not have lines at all. However, you can use a skin that has them, for example:
http://demos.telerik.com/aspnet-mvc/treeview?theme=simple
All the best,
Dimo
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now.
0
Ross
Top achievements
Rank 1
answered on 30 May 2012, 02:54 PM
Thanks, it worked once I switched themes!