- Search Option
- Endless Scroll
- Fixed Headers ( using groups )
- Pull To Refresh
All 4 features doesn't work together. For eg, The FixedHeader doesn't seems to work in combination with Endless Scroll and Pull to refresh. Also the search option never works. Also the "sort" option never works.
Below is my code which I'm calling on data-init of my View.
function loadContactListView(){
var dataSource = new kendo.data.DataSource({
transport: {
read: function(options){
app.db.transaction(function (tx){
if(localStorage.getItem('userCompany')){
fetchQuery = "SELECT FirstName , ImageFilePath, Company, Mobile_Number, id from employee_db WHERE Company = '"+localStorage.getItem('userCompany')+"'";
}else{
fetchQuery = "SELECT FirstName, ImageFilePath, Company, Mobile_Number, id from employee_db";
}
tx.executeSql(fetchQuery, [], function (tx, result) {
var data = [];
for (var i = 0; i < result.rows.length; i++) {
data[i] = result.rows.item(i);
}
options.success(data);
});
});
}
},
sort: {
field: "FirstName",
dir: "desc"
},
serverPaging: true,
serverFiltering: true,
serverSorting: true,
pageSize: 50,
group: "Company"
});
$("#filterable-listview").kendoMobileListView({
dataSource: dataSource,
template: $("#mobile-listview-filtering-template").html(),
fixedHeaders: false,
filterable: {
field: "FirstName",
operator: "startswith"
},
pulltorefresh: true,
endlessScroll: true
});
}