Hi,
I have a treeview and a grid where the select node id is used in the Data Event from the grid to filter the data based on the treeview selection.
function onMitglieddokumente_DataFilter() { var treeView = $("#tvwDokumentenablagestruktur").data("kendoTreeView"); var selectedNode = treeView.select(); var id = 1; if (selectedNode.length != 0) { var item = treeView.dataItem(selectedNode); id = item.id; } return { mitgliedid: @ViewContext.RouteData.Values["mitgliedid"], ordnerid: id };}
in the Treeview onSelect Event I refresh the grid datasource:
function onTreeviewChange(e) { $("#gridMitglieddokumente").data("kendoListView").dataSource.read(); };
the Problem with that solution is, that I always get the latest selection of the Treeview not the current one!
if I use the onChange Event the refresh is fired more than ones because it fires on selection and on expand...
robert