Hi everyone,
I have aproblem with the Kendo UI TreeView and I'm looking for a solution for a while now.
In my view I fill my TreeView like this:
Html.Kendo().TreeView() .Name("treeview") .BindTo((IEnumerable<TreeViewItemModel>) ViewBag.inlineDefault) .Events(events => events .Select("onSelect") )private IEnumerable<TreeViewItemModel> GetDefaultInlineData(ArrayList tables) { List<TreeViewItemModel> names = tables.Cast<TreeViewItemModel>().ToList(); List<TreeViewItemModel> inlineDefault = new List<TreeViewItemModel> { new TreeViewItemModel { Text = "Tables", Items = names } }; return inlineDefault; }My onSelect funtion is the following:
<script> function onSelect(e) { $.ajax({ type: 'POST', url: '/Editor/GetTableContent' , data: { tableName: ?????? }, success: function (data) { $('#table').html(data); } }).done(function () { alert('Done'); }); }</script>It calls a mehtod in my controller that needs the name of the selected node as parameter (string) to display the content of a table in a grid.
Is there a possibility to get what I need?
Thx for your help!
Erik
