We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

TreeView is not rendering

Thread ID:

Created:

Updated:

Platform:

Replies:

117131 Aug 19,2014 02:55 AM Aug 20,2014 08:55 AM ASP.NET MVC 1
loading
Tags: TreeView
Miroslav Mrazik
Asked On August 19, 2014 02:55 AM

Hi,

I'm trying to create a view with TreeView bound to local datasource. I do it according to this tutorial from your documentation except that I do not use those styles and splitter and of course I looked at demos but that didn't help as well. The result is still an empty page. I attached my sample project. Can you please tell me what am I still missing?

Attachment: SyncfusionTest_269280be.zip

Harikrishnan P [Syncfusion]
Replied On August 20, 2014 08:55 AM

Hi Miroslav,

Thanks for using Syncfusion products.

We have analyzed the sample that you have attached. It is found that, members of the <List> “TreeViewItem” are not properly mapped to the “TreeViewFields”. In the “Text” field, it is mapped as “Text” instead of “name”. This is the root cause for the reported issue (“Tree view not rendering”). So, please use the Tree view fields as shown below,

 

@Html.EJ().TreeView("MyTreeView").TreeViewFields(s => s.Datasource((IEnumerable<TreeViewItem>)ViewBag.TreeViewDS).Id("Id").ParentId("ParentId").Text("Name"))

 

 

Also, it is found that “ej.theme.min.css” and “ej.widgets.core.min.css” files are not included in your project. “ej.widgets.all.min.css” has reference to the above mentioned files. So, it is necessary to include these two files. We have made these changes in your project and attached the same in the following location.

Sample Location: Treeview Sample

Also, you can refer the following online documentation link to get start with our ASP.NET MVC components.

http://help.syncfusion.com/web

Please get back to us if you would require any further assistance.

Regards

HariKrishnan


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;