I am using advanced filtering. When I click the search button I am intercepting the iggridfilteringfilterdialogfiltering event.
Due to my ui requirements I want to add the contents of the advanced filtering to some conditions I already have in a js class and then use the filter method to do the filtering.
Is there a way to get them?
Hello bubblesdad,
Please do not hesitate to contact me if you are still experiencing any issues with this scenario.
Thesecond argument (ui) passed to thedataFiltering event of the filtering feature contains a reference to the advanced filter dialog object, through which the current expressions in the filter dialog may be accessed. For instance:
dataFiltering: function(evt, ui) { var currentExpressions = ui.owner._currentAdvancedExpressions; }
This will return an array of the current expressions in the advanced filter.
Hope this helps. Please feel free to contact me if you have any questions.
As before - when I intercept the filtering event the contents of $(selector).data('igGrid').dataSource.settings.filtering.expressions only seems to have the values as they were before the dialog was opened.
Am I doing something wrong or are my expectations incorrect.
once I examined the HTML and played around a bit I found it was purely and simply that I hadn't fully selected the elements. Doh
I've tried using $('#GetSeriesDialogGrid').data('igGrid').dataSource.settings.filtering.expressions but that always seems to have the previous filtering expressions - I want what I've just entered in the dialog.