Hi there,
How to remove the whitespaces in filter #text_filter ?
I’m not pretty sure what do you mean by “remove the whitespaces”, but you can use onFilterStart event as
mygrid.attachEvent(“onFilterStart”,function(a,b){
//b - array of values from filter inputs
//you may change them in any necessary way
mygrid.filterBy(a,b);
return false;
});
Hi there,
I mean removing extra blank spaces from start and end for filter string.
Example: " Filter String "
mygrid.attachEvent(“onFilterStart”,function(a,b){
for (var i=0; i<b.length; i++)
b[i]=b[i].replace(/^[ ]+/,"").replace(/[ ]+$/,""); //trim whitespaces
mygrid.filterBy(a,b);
return false;
});