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!
Edit:
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;
}
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!
Edit:
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;
}