I have the following grid rendering with a pager:
and I'm wondering if you have any advice on listening for the page size combo box (outlined in red) being rendered? I have it being rendered with the following settings:
... features: [ ... { recordCountKey: 'TotalRecordsCount', pageIndexUrlKey: 'page', pageSizeUrlKey: 'pageSize', name: 'Paging', pageSize: 100, type: 'remote', pageCountLimit: 50, currentPageIndex: 0, pageSizeList: [ 5, 10, 20, 25, 75, 100 ], totalRecordsCount: 0 }, ... ], ...
I tried giving the grid's "rendered" parameter a method and then tried retrieving the combo box there, but the combo box is not yet rendered by that stage. The same goes for the "iggridpagingpagerrendered" event; this only seems to trigger when the paging footer is rendered (the footer containing the next/prev buttons in the screenshot above) but, again, the combo box is not rendered by this stage.
Any help would be appreciated. Thanks in advance!
Hello Taylor,
Thank you for following up!
It seems that the image is still not visible, however, I have prepared a small sample demonstrating my suggestion. Also, the pagerRendered and iggridpagingpagerrendered are the same event, yes, and on my side everything seems to work as expected - the ready method is fired last, i.e., after the igGrid rendered event and the respective drop-down is fetched.
Here could be found my sample for your reference. I have color coded the two drop-downs and left explanatory comments. Please test it on your side and let me know how it behaves.
If you continue to experience this behavior, it would be highly appreciated if you could modify the sample so it demonstrates the behavior on your side.
Having a sample that I can debug on my side will be extremely helpful in further investigating this matter and providing you with a solution as soon as possible.
Thank you for your cooperation. Looking forward to your reply.
Sincerely, Riva Ivanova Software Developer
Sorry, here's the screenshot, it's this combo box here:
I tried the document ready method but it ends up triggering before the grid is rendered, so the combo box does not exist by that point.Also, is the pagerRendered event the same as the "iggridpagingpagerrendered" event? As I had tried that but only the footer with the next/prev buttons are rendered in that event, not the combo box.
Thank you for posting in our community!
I have been looking into your question and it seems that the attached image is not displayed.
If you refer to the drop-down that changes the page size, what I could suggest is using the document ready function:
$(document).ready(function () { const combo = document.querySelector(".ui-iggrid-pagesizedropdown"); console.log(combo); });
If you refer to the drop-down that changes the page index, what I would suggest is using the pagerRendered event:
{ recordCountKey: "TotalRecordsCount", pageIndexUrlKey: "page", pageSizeUrlKey: "pageSize", name: "Paging", pageSize: 100, type: "local", pageCountLimit: 50, currentPageIndex: 0, pageSizeList: [5, 10, 20, 25, 75, 100], totalRecordsCount: 0, pagerRendered: function (evt, ui) { const combo = document.querySelector('.ui-iggrid-pagedropdowncontainer div.ui-igedit'); console.log(combo); }, },
Please test these approaches and let me know if you need any further assistance regarding this matter.
Sincerely,Riva IvanovaSoftware Developer