Hi,
I am wondering if there is a way to implement a filter in the header allowing a user to choose multiple options. I have a status column and am wondering if I can allow someone to choose all “Open” and all “Unassigned” at the same time rather than doing 2 different searches.
I have tried this unsuccessfully. Basically, I’d like to filter the grid by multiple values from one column. In your common grid example using Authors I’d like the filter to show “King” or “Grisham” so both authors will show, exluding all others. Is this possible?
I’ve been triggering the event with a button and have an external list of checkboxes (from a dhtmlxCombo) to filter a column with.
function filterMulti() {
var checked_array = combo.getChecked();
for(var i=0;i<checked_array.length;i++) {
mygrid.filterBy(6, checked_array[i], false);
}
}
The problem is that it always returns no values because it will filter by the first value, and then filter not the entire grid by the next value but instead filter the returned first value. So you have 4 values in the column (Grisham, King, Baldacci, and Woods) and if you check 2 items to filter by, say “Grisham” and “King” the filter pulls out all the Grishams and from that Grisham list applies the King filter. So when filtering by more than one value it always returns no values. How to display both “Grisham” and “King”? If I use the preserve true, it will filter from the preserved state which I don’t want. If I use the preserve false, it does filter from the initial state, but doesn’t combine with the earlier filter.