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.
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.