The igGrid pager records label will at times display "1 - # of ## records" then other times display "### matching records" (after filtering)
For example:
Page size is set to 100. Initial load will result in 8935 records. The pager records label will display "1 - 100 of 8935 records". I will reinitialize the igGrid (with filtering) which will return 159 total records. The page size is still 100 however the label will display "159 matching records".
Please advise how I can get this label to display "1 - # of ## records" after filtering to accurately reflect what record range I'm in.
After a little research, I've discovered that this is called the "filter summary". How can I disable the "filter summary" so that the paging details are displayed?
I've come up with a work around, but hope there is a more "official" API solution.
I handled the "dataRendered" event in the igGrid. Then I check the "data-localeid" attribute of the "pager label" element. If it's not "pagerRecordsLabelTooltip", then I set it to the "1 - # of ## records" format:
function FixPagerLabelAfterFilter() { let pager = $("#igGridElement_pager_label"); if (pager.attr("data-localeid") !== "pagerRecordsLabelTooltip") { let startRecord = pager.attr("data-startrecord"); let endRecord = pager.attr("data-endrecord"); let recordCount = pager.attr("data-recordcount"); pager.text(startRecord + " - " + endRecord + " of " + recordCount + " records"); } }
Hello Justin,
Thank you for posting in our community.
You observation is correct; this is filter summary which is rendered by default. I am currently investigating for the best approach to modify this summary so that it meets your requirement. I will keep you posted on my progress.
Please feel free to continue sending updates to this case at any time.
Thank you for your patience while I was looking into this matter for you.
After further investigation I determined that at this point we do not have an out-of-the-box solution for turning off the filtering summary. Since your workaround is applied in dataRendered event, which is fired every time after data is filtered, it seems that it is a reasonable approach for achieving your requirement.
Please let me know fi you need any further assistance regarding this matter.
Thanks for looking into it. Can this possibly be added as a new feature request? To turn off the filter summary?