I am trying to implement the "excel like" filters in kendo filters, what i m doing right now is really old fashion way (pushing HTML tags to kendo filter and hiding the default filters):
newFilter.push('<input id="searchbox" Type="text">');
newFilter.push('<div id="checkboxes"></div>'); // add more checkboxes in the div tags later.
filter = $('form.k-filter-menu').children(),
submit = filter.children().last(),
submit.before(newFilter.join(''));
I was wondering if there is a better way of doing this?
Also, By doing this, i need to have my own filter object, and pass it into dataSource, then combine my filter object with kendo default filters:
this.transport = {
read: $.proxy(function (options) {this.getPageData(options, myFilters)}, this)
};
getPageData: function(options, myFilters) {
data.filter = data.filter ? this.filter 1: null;
data.filter.concat(myFilters);
// DataBase calls on data.filters
...
},
however, i found getPageData is only called when kendo filter object is not empty, in another words, since I had my own filters, thus the getPageData() will never get called since the original kendo object is never changed, so i have to fake some data into kendo.grid.dataSource.filter.filters() in order to let the event fired. Is there another way to fire the event without faking any data.
newFilter.push('<input id="searchbox" Type="text">');
newFilter.push('<div id="checkboxes"></div>'); // add more checkboxes in the div tags later.
filter = $('form.k-filter-menu').children(),
submit = filter.children().last(),
submit.before(newFilter.join(''));
I was wondering if there is a better way of doing this?
Also, By doing this, i need to have my own filter object, and pass it into dataSource, then combine my filter object with kendo default filters:
this.transport = {
read: $.proxy(function (options) {this.getPageData(options, myFilters)}, this)
};
getPageData: function(options, myFilters) {
data.filter = data.filter ? this.filter 1: null;
data.filter.concat(myFilters);
// DataBase calls on data.filters
...
},
however, i found getPageData is only called when kendo filter object is not empty, in another words, since I had my own filters, thus the getPageData() will never get called since the original kendo object is never changed, so i have to fake some data into kendo.grid.dataSource.filter.filters() in order to let the event fired. Is there another way to fire the event without faking any data.