Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Amb on Mar 11, 2009 04:21
open dhtmlx forum
Grid filter: HTML select drop down to include blanks

I would like to get the HTML select filter to be able to filter for blank values. Currently, in IE and Firefox, blank values seem to be ignored when collecting values to put into the select box. In Chrome, they ARE included. I would like the Chrome behavior in IE and Firefox too.

Thanks,

Note that I have amended the HTML select on the grid filter to use "All" rather than "" as the default (no filtering) option like so:

dhtmlXGridObject.prototype._loadSelectOptins=function(t,c){
    var l=this.collectValues(c);
    t.innerHTML="";
    t.options[0]=new Option("All","");
    var f=this._filter_tr?this._filter_tr[c]:null;
    for (var i=0;i<l.length;i++)t.options[t.options.length]=new Option(f?f(l[i]):l[i],l[i]);
};

Answer posted by dhxSupport on Mar 11, 2009 05:05
Answer posted by Amb on Mar 11, 2009 05:11
Hello, that doesn't work for getting the blank value into the select box.