Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Gabi on Jun 18, 2008 05:21
open dhtmlx forum
#select_filter and filterBy question

Hi.

I'm using mygrid.filterBy to filter some data. However, the #select_filter checkbox is not selected with the current filtered value.

How can I fix this ?
Answer posted by Support on Jun 18, 2008 06:33

The changes of #select_filter cause filtering in grid, but there is no backward behavior - applying fitlerBy method to grid directly, will not change state of grid filters. 

You can try to access and change state of object directly through DOM
         grid.hrd.rows[2].cells[3].getElementsByTagName("SELECT")[0].value=some;
where 2 and 3 index of header row and column, where input placed


Answer posted by Gabi on Jun 18, 2008 07:09
Thank you for the fast answer!

However, i grid.hrd is undefined. ( grid is the name of my grid )
Answer posted by Support on Jun 18, 2008 08:52

Sorry, was a my typo. The correct command will be 

 grid.hdr.rows[2].cells[3].getElementsByTagName("SELECT")[0].value=some;

grid.hdr - the HTML object of grid's header