Calipso
Calipso

Reputation: 967

Kendo Mobile - Filter in Remote DataSource Connected Listview is not working

I am designing a modalview with a listview inside. The listvew is getting data from a remote datasource.

I could get the data but when I enter a value in the serch-box it doesn't response..

I am using endless Scroll and the data might include hundreds of rows. can this be the reason? anyway, I can even not filter the row that already exists on the page.

var datasourceLovItems = new kendo.data.DataSource({
  transport : {
      read : {
          url : sample.php,
          dataType : "jsonp",
          type : "GET",
          data : {}
      }
  },

  schema : {
      total : function() {
          return 2000;
      },
      model : {
          fields : {
              RETURN_VALUE : {
                  type : 'string'
              },
              COLUMN_1 : {
                  type : 'string'
              },
              COLUMN_2 : {
                  type : 'string'
              },
              COLUMN_3 : {
                  type : 'string'
              }
          }
      }
  },
  serverPaging : true,
  serverSorting : true,
  serverFiltering: true,
  pageSize : 50
});

$("#lovListView").kendoMobileListView({
  dataSource : datasourceLovItems,
  template : $("#listviewLovTemplate").html(),
  filterable : {
      field : "COLUMN_1",
      operator : "startswith"
  },
  endlessScroll : true
});

Upvotes: 0

Views: 641

Answers (1)

CodingWithSpike
CodingWithSpike

Reputation: 43708

Since serverFiltering is true Kendo should be relying on your server implementation to filter the data. In your browser dev tools, check to see if it is sending a network request to fetch filtered data after you type a couple characters into your search box.

If it does, then you should look at the server's response. The server should return filtered data.

If this is not how you expect it to work, you can have the filtering done on the client by Kendo by setting serverFiltering to false.

Upvotes: 1

Related Questions