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

Tree view on demand data binding

0 Answers 123 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Steven asked on 28 Aug 2012, 01:02 AM
I have managed to follow most of the examples and instructions regarding how to configure my Kendo UI MVC TreeView for remote data/on-demand binding.  However, I have not been able to find out what parameters needs to be setup on the server to get it to work properly.

Is there an example I can follow that shows server methods/parameters?  All of the examples I've seen so far only include client methods/parameters.

I have managed to get the call to the server to work using :
@Html.Kendo().TreeView().Name("treeView").DataSource(dataSource => dataSource.Read(read => read.Action("actionName", "controllerName")))

but none of the parameters and return values I've worked with on the server work at all.

Any and all C# (or even VB) server-side MVC controller method examples are appreciated!


My apologies, but this should probably be in the Kendo MVC section of the forums.  I also think I have found my answer...the problem was that I was not allowing Get requests to my controller method.  The resulting exception was getting buried somewhere.  I have since changed my controller method and result list to a custom class as follows:

public JsonResult TreeView(string id)

which returns a list of:

    public class kendoTreeViewItem
        public string id;
        public string text;
        public string imageUrl;
        public string spriteCssClass;
        public bool hasChildren;
        public bool encoded;


No answers yet. Maybe you can help?

Asked by
Top achievements
Rank 1
Share this question