Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Raghu on Nov 01, 2008 06:35
open dhtmlx forum
Grid Filter

Hi,
How to check for the exact values in the filters and the case
Answer posted by Support on Nov 03, 2008 03:56
You can create own filter. The article about it is: dhtmlxGrid/doc/articles/Data_filtering_search.html

Or you can modify internal _filterA method in the dhtmlxgrid_filter.js:

dhtmlXGridObject.prototype._filterA=function(column,value){
    if (value=="") return;
    var d=true;
    if (typeof(value)=="function") d=false;
    else value=(value||"").toString().toLowerCase();
    if (!this.rowsBuffer.length) return;
    
    for (var i=this.rowsBuffer.length-1; i>=0; i--)
    //    if (d?(this._get_cell_value(this.rowsBuffer[i],column).toString().toLowerCase().indexOf(value)==-1):(!value(this._get_cell_value(this.rowsBuffer[i],column),this.rowsBuffer[i].idd)))
  if (d?(this._get_cell_value(this.rowsBuffer[i],column).toString()==value):(!value(this._get_cell_value(this.rowsBuffer[i],column),this.rowsBuffer[i].idd)))
            this.rowsBuffer.splice(i,1);//filter row
}