Remote Datasource filtering

2 posts, 1 answers
  1. manpreet
    manpreet avatar
    3 posts
    Member since:
    Sep 2014

    Posted 13 Oct 2014 Link to this post

    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"

    Controller Code :

    $scope.tvc = {};

            $scope.tvc.treeData = new{
                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.


    Currently, it is fetching like this :


    Any pointers will be appreciated.

  2. Answer
    Alex Gyoshev
    Alex Gyoshev avatar
    2513 posts

    Posted 15 Oct 2014 Link to this post

    Hello Manpreet,

    You can pass additional data along with the request by setting the field. If you need to compute the URL each time, set the field as a function. For maximum flexibility, you can define as a function and make the AJAX request manually -- see the custom binding help topic.

    Alex Gyoshev
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top