Hi there,
I have a tree view control on my view and I am binding to a json data source in controller code.
<div kendo-tree-view="tvc.tree"
k-data-source="tvc.treeData"
k-options="tvc.treeOptions">
</div>
Controller Code :
$scope.tvc = {};
$scope.tvc.treeData = new kendo.data.HierarchicalDataSource({
transport: {
read: {
url: options.api.base_url + "/GeoCodeData",
dataType: "json"
}
},
schema: {
model: {
id: "GeoCode",
hasChildren: function (e) {
return true;
}
}
}
});
$scope.tvc.treeOptions = {
checkboxes: {
checkChildren: true
},
dataTextField: "GeoCode"
};
Everything works fine when it loads the root node. On subsequent expansion of nodes, it fetches data again by querying datasource. The only parameter passed is "GeoCode" which is defined in schema model.
My requirement is to pass additional filters. The model, with which tree view is binding contains 3 properties. I need to pass like this.
http://localhost:4416/api/GeoCodeData?GeoCode=US&GeoLvl=1
Currently, it is fetching like this :
http://localhost:4416/api/GeoCodeData?GeoCode=US
Any pointers will be appreciated.
Thanks.
I have a tree view control on my view and I am binding to a json data source in controller code.
<div kendo-tree-view="tvc.tree"
k-data-source="tvc.treeData"
k-options="tvc.treeOptions">
</div>
Controller Code :
$scope.tvc = {};
$scope.tvc.treeData = new kendo.data.HierarchicalDataSource({
transport: {
read: {
url: options.api.base_url + "/GeoCodeData",
dataType: "json"
}
},
schema: {
model: {
id: "GeoCode",
hasChildren: function (e) {
return true;
}
}
}
});
$scope.tvc.treeOptions = {
checkboxes: {
checkChildren: true
},
dataTextField: "GeoCode"
};
Everything works fine when it loads the root node. On subsequent expansion of nodes, it fetches data again by querying datasource. The only parameter passed is "GeoCode" which is defined in schema model.
My requirement is to pass additional filters. The model, with which tree view is binding contains 3 properties. I need to pass like this.
http://localhost:4416/api/GeoCodeData?GeoCode=US&GeoLvl=1
Currently, it is fetching like this :
http://localhost:4416/api/GeoCodeData?GeoCode=US
Any pointers will be appreciated.
Thanks.