Good day,
I currently have the following
The question I have is I want, either in my MVC wrapper or through the js widgets to pass through a property called Type from my treeview back to the controller when I expand a Node. How would I go about getting this property to the server when expanding a node?
I explicitally need to know what method to call on the datasource object as I can't find a way to get this property from the client to the server, it's needed as I'm working with data with a composite key...
I currently have the following
@Html.Kendo().TreeView() .Name("treeview") .DragAndDrop(true) .DataTextField("Name") .Events(events => events .DragEnd("Change") .Select("Selected") .Expand("OnExpand") ) .DataSource(dataSource => dataSource .Read(read => read .Action("GetTreeViewData", "Home")) );
public JsonResult GetTreeViewData(int? id, string Type) /* how can I get my type property here? */ { //data is returned from db - excluded for brevity return Json(data, JsonRequestBehavior.AllowGet); }
The question I have is I want, either in my MVC wrapper or through the js widgets to pass through a property called Type from my treeview back to the controller when I expand a Node. How would I go about getting this property to the server when expanding a node?
I explicitally need to know what method to call on the datasource object as I can't find a way to get this property from the client to the server, it's needed as I'm working with data with a composite key...
treeview.dataItem(e.node).Type (with Type being a property in my Json for the Node)