It’s possible to filter a column with checkbox?
I’ve tried with filterBy but it’s works only with text.
yes, it’s possible to filter a column with a checkbox.
If the problem still occures please provide any kind of sample or demo link where it can be reconstructed.
this.MyGrid.filterBy(this.MyGrid.getColIndexById(id),value);
What is the correct value for “value” to filter the row with checked checkbox?
It’s possible to make complex filter with value of 2 or more columns?
For example the row with the 3rd column checked and the 5th column unchecked?
The checkbox has two available values:
1 - for checked checkbox
0 - for unchecked checkbox.
To achive your demand you may express the second papameter of filterBy() method as a function.
Look here:
http://docs.dhtmlx.com/doku.php?id=dhtmlxgrid:api_method_dhtmlxgridobject_filterby
It’s works if I use value of “1”. The grid shows only the rows with the checked checkbox. If I use the value of “0” the grid shows all rows (checked & unchecked).
Unfortunately we cannot reproduce this issue locally. Please provide us the complete demo where we can reproduce it
The answer on viewtopic.php?f=17&t=18132&p=56671#p56671 don’t resolve the problem.
Using state instead of value don’t solve the filtering problem.
By the way the filter needs 0 or 1 value, the state can be true or false.
I’ve added this code to solve
if (state)
{
SearchField = 1;
}
else
{
SearchField = 0;
}
used in this way:
Grid.filterBy(Grid.getColIndexById(i),SearchField);
but work only with 1 (the grid show the rows with checked checkbox), don’t work with 0(the grid show all rows).
Please attach the completed demo to reproduce the problem docs.dhtmlx.com/doku.php?id=othe … leted_demo