Categories | Question details Back To List | ||
dhtmlXGridFromTable Filter Hello everyone, I am using the dhtmlXGridFromTable to laod my data from database into the table and trid to add filter in the header using the follwing codes but it just shows the text field and the filter is not working. myGrid.setHeader('Org Type,Org Name,Acronym,Link'); myGrid.attachHeader(',#text_search,#cspan,#cspan'); function filterBy() { var tVal = document.getElementById('title_flt').childNodes[0].value.toLowerCase(); for(var i=0; i< myGrid.getRowsNum();i++) { var tStr = myGrid.cells2(i,1).getValue().toString().toLowerCase(); var aStr = myGrid.cells2(i,2).getValue().toString().toLowerCase(); if( tVal=='' || tStr.indexOf(tVal)==0) myGrid.setRowHidden(myGrid.getRowId(i),false) else myGrid.setRowHidden(myGrid.getRowId(i),true) } } would be grateful If someone can explain maybe by giving a full detail example. thanks, J Answer posted on Sep 01, 2008 01:21 Most probably you havenot included next js file ext/codebase/dhtmlxgrid_filter.js |