How to call multiple fileter in DHTMLX Grid

Hi,

I would like to call multiple function in DHTMLX Grid.

I have a table which is having following 7 column
EX:
No. | Name | Age | Gender | Marital Status | Education | City |

I would like to filterby this grid with multiple function like i want to say I want filtering in Gender Column and also in Age Column who are < 35.

Currently I’m using

function doFilter(){
mygrid.filterBy(3,‘M’,true);

}

and its working fine for me for Gender Column now i want to use < 35 function in age column also could you please tell me how to use

mygrid.filterBy(2,function(a){ return (a > 55);} );

when i use this function with doFilter() function

function doFilter(){
mygrid.filterBy(3,‘M’,true);
mygrid.filterBy(2,function(a){ return (a > 55);} );

}

I’ll get value only from Age filter not from Gender column

Please let me know how to apply multiple function with condition in DHTMLX Grid.

Thanks & Regards,
Ankit

You can set second parameter of filterBy to stack filters

mygrid.filterBy(3,'M',true); mygrid.filterBy(2,function(a){ return (a > 55);}, true);

with such code grid will be filtered by two rules at the same time.

I use this 2 sentences:

var filterObject= grid_1.getFilterElement(0).value;

And it works ok, but when I execute:

grid_1.setFilterElement(0).value = filterObject;

I get this error message:

grid_1.setFilterElement is not a function.

thanks

muncu

You still need to use the getFilterElement() method:
grid_1.getFilterElement(0).value = filterObject;