EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: Stefan B. on November 04, 2014, 07:41:14 AM



Title: Extension DataGrid Filter Row - How can I disable a filter on runtime?
Post by: Stefan B. on November 04, 2014, 07:41:14 AM
My Question is how can I disable the filter for the datagrid?

On the Extension "DataGrid Filter Row" there is ony the method 'enableFilter' no methode called 'disableFilter'!

But we change the table fields and data on runtime. So some fields are hidden and shown by select a combo value.
And with the current implementation then the filters not shown correct.


Title: Re: Extension DataGrid Filter Row - How can I disable a filter on runtime?
Post by: stworthy on November 05, 2014, 12:04:58 AM
Please try to extend the 'disableFilter' method as below:
Code:
$.extend($.fn.datagrid.methods, {
disableFilter: function(jq){
return jq.each(function(){
$(this).datagrid({
loadFilter: $.fn.datagrid.defaults.loadFilter
});
});
}
})