Hi
in one business scenario we have to clear applied filter from grid by jquery for that we are doing
$("#grid1").igGridFiltering("filter", []);
and
var $gridFiltering = $("#grid1").data("igGridFiltering"); var editors = $gridFiltering._editors; for (var itr = 0; itr < editors.length; itr++) { if (editors[itr].value != undefined && editors[itr].value != null) { editors[itr].value(null); } }
its work fine for all cells but in one case where grid filter is applied "Not Empty" or "Empty" it doesn't work.
is it bug. or is there any better way to clear filter and reset filter text/expression.
looking for your response
Thanks
Hello ptilwani,
Thank you for the clarification. I am able to see the issue now.
I have created a support case for you with an ID of CAS-164354-Z0B3L2. The matter has been determined to be a development issue and has been logged in our tracking system with ID: 206864.
I will leave this case open and update you with any new information. You can view the status of the development issue connected to this case by going to the “Account” tab on our website, selecting "My Support Activity" and then this support case will be listed there. Then, you may select the "Development Issues" tab to view details of this development issue.
Please let me know if you have any questions.
Hi Michael
we are using latest version 15.1.20151.2112
that's column has datatype string and its using template to show images based on condition.
and we are facing this issue on ie 11 as we la chrome latest version.
I tried your options but its not make any effect.
$("#grid1").igGridFiltering("filter", [], true);
i am again elaborating my issue we have one button say "clearFilter" and on that we are calling these functions to clear gridFilter, sorting on first Column and resetting the filter input text to default.
function clearGridFilter(id){ $("#" + id).igGridFiltering("filter", [], true);}
function clearGridSorting(id, sortColumnKey, gridFirstCol) { if (sortColumnKey != undefined && sortColumnKey.length != 0) { for (var i = 0; i < sortColumnKey.length; i++) { $("#" + id).igGridSorting("unsortColumn", sortColumnKey[i]); } } $("#" + id).igGridSorting("sortColumn", gridFirstCol, "ascending"); $("#" + id).igGridSorting("unsortColumn", gridFirstCol);}
function clearFilterText(id) { var $gridFiltering = $("#"+id).data("igGridFiltering"); var editors = $gridFiltering._editors; for (var itr = 0; itr < editors.length; itr++) { if (editors[itr].value != undefined && editors[itr].value != null) { editors[itr].value(null); } }}
but a special case if we applied a filter not empty/ empty filter on grid any column and after that call "clearfilter" function that column does not get cleared by above function and again if put any filter in any other column notempty/empty filter column filter will applied automatically.
Hope you got my point if you need anything please let me know waiting for your help as soon as possible.
Thank you for posting in our forums!
I am able to clear an "Empty" or "Not Empty" filter by using the following code:
Could you provide more details about the issue for me? Please answer my following questions:
1. What version and build of IgniteUI are you using?2. What is the dataType of the column(s) this is occuring on?3. What browser(s) are you experiencing this on?
If you have any additional info that could help, please let me know.
Hi team
Waiting for your response.