Hi,
I’m using a Pro v3.6 of DHTMLX, having issues with Filtering through Grid Header
- I’m using a two state toolbar button to show/hide the header , following forum posts i’ve solved the issue [reset filters] when the header is removed
but my next problem is that the header filters only work for the first time the header is shown , all subsequent add/create results in a nonfunctional filtering fields
any comments/suggestions will be much appreciated
below is the button event handler code :
[code] case “cppp_filter”:
if(state){ ProcessGrid.attachHeader("#text_filter,#text_filter,#select_filter,#select_filter,#text_filter,#numeric_filter");
ProcessGrid.setSizes();
}
else {
var nCols = ProcessGrid.getColumnsNum();
for(i=1 ; i<nCols ; i++){
ProcessGrid.getFilterElement(i).value = “”;
ProcessGrid.filterBy(i,"");
}
ProcessGrid._f_rowsBuffer = null;
ProcessGrid.filterByAll();
try{ ProcessGrid.detachHeader(1); }catch(err){};
}
break;[/code]
Grid Loading Code :
[code] ProcessGrid.clearAll();
ProcessGrid.load("/php/EnumProcess.php?ProjID="+ProjID, function(){
var nCols = ProcessGrid.getColumnsNum();
for(i=1 ; i<nCols ; i++){
ProcessGrid.getFilterElement(i).value = “”;
ProcessGrid.filterBy(i,"");
}
ProcessGrid._f_rowsBuffer = null;
ProcessGrid.filterByAll();
ProcessGrid.refreshFilters();
if(MainToolBar.getItemState(“cppp_filter”)){
try{ ProcessGrid.detachHeader(1); }catch(err){};
ProcessGrid.attachHeader("#text_filter,#text_filter,#select_filter,#select_filter,#text_filter,#numeric_filter");
ProcessGrid.setSizes();
}
}, “js” );[/code]
Regards,
MOTASH