Hello,
Within our grid, we are attempting to create a simple clear filter function. We've gotten the ability to reset our filter with the following line of code:
$(
"#grid"
).igGridFiltering("filter',[]);
Pete,
I recommend starting a new thread and including more details and including an example if possible. At least include the relevant code that you are using.
Hi, is there a way to invoke the trigger to filter the grid? When I use .igGridFiltering, I keep getting the error saying "cannot call methods on igGridFiltering prior to initialization; attempted to call method 'option'"
Hi thank's for your help, i tried your solution but it doesn't work propably because i have a posterior version of infragistics ! I have a Date column that could be filter by date of today, past year, actual year ... When i reset filters the grid refresh correctly but the column date keep the last filter so if i filter again with another feild they take in consideration the two column condition, thus it filter the first time in the date and a second time for the other column.
Is there any recent solution to solve this problem or another way to refresh the filtered column ?
Thank's for your time and your explanation.
Hello Patrick,
I have linked you case to the Development issue 124163. You will be notified once the service release is out include this fix.
Please let me know if I can provide any further assistance regarding this matter.
Using this approach you wil change only the value of the filtering editor but this won't invoke the filtering event.
You need to use the filter method for the purpose.
function clearFilter() { var colSettings = $("#grid1").igGridFiltering("option", "columnSettings"); for (var i = 0; i < colSettings.length; i++) { $("#grid1").igGridFiltering("filter", ([{ fieldName: colSettings[i].columnKey, expr: '5', cond: colSettings[i].condition}])); } }
var colSettings = $("#grid1").igGridFiltering("option", "columnSettings");
for (var i = 0; i < colSettings.length; i++) {
$("#grid1").igGridFiltering("filter",
([{ fieldName: colSettings[i].columnKey, expr: '5', cond: colSettings[i].condition}]));
}