Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Agile on Oct 23, 2008 00:12
open dhtmlx forum
Show hide filter

Hi Team,

Is there any way to Show/Hide filters on certain events using javascript?

I am using mygrid.attachHeader("#text_filter,#text_filter") to add filter.

Thanks,

-Agile

Answer posted by Support on Oct 23, 2008 02:41
But it can be done through DOM as follows:
 
var input1 = grid.hdr.rows[2].cells[0].getElementsByTagName("INPUT")[0];
var input2 = grid.hdr.rows[2].cells[1].getElementsByTagName("INPUT")[0];

function hide(){
    input1.style.display = "none";
    input2.style.display = "none";
}
function show(){
    input1.style.display = "";
    input2.style.display = "";
}