jQuery UI Widgets › Forums › Grid › Grid Pager
This topic contains 3 replies, has 2 voices, and was last updated by Dimitar 11 years, 9 months ago.
-
AuthorGrid Pager Posts
-
Hi,
I want to disable the pager buttons as per the following condition;
1) If it is last page, I want the right button i.e. “Next” to be disabled. As well as, it has to be enabled when the current page is less than last page count. Vice Versa
2) If it is first page, I want the left button i.e. “Previous” to be disabled. As well as, it has to be enabled when the current page is larger than first page count. Vice Versa
Methods I Tried:
$("#jqxgrid").on("pagechanged", function (event) { var args = event.args; var pagenum = args.pagenum; var pagesize = args.pagesize; var paginginfo = $("#jqxgrid").jqxGrid('getpaginginformation'); var getpagerRightBtn = $(this).find('#pager').find('.jqx-icon-arrow-right').parent(), getpagerLeftBtn = $(this).find('#pager').find('.jqx-icon-arrow-left').parent(); if(pagenum == paginginfo.pagescount-1) { if(getpagerRightBtn.attr('title') =='next') { $(getpagerRightBtn).jqxButton({ disabled: true, theme: theme }); } } else if(pagenum < paginginfo.pagescount-1) { if(getpagerRightBtn.attr('title') =='next') { $(getpagerRightBtn).jqxButton({ disabled: false, theme: theme }); } } });
If I use this, my requirement gets satisfied by making the right button i.e. “Next” disabled when it is last page. At the same time when I click the left button i.e. “Previous”, the click event for pager is not getting triggered.
Can someone help me on this regards?
Looking for solution.
Regards,
\_rssbHello rssb,
Unfortunately, this functionality cannot be implemented.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/Dimitar,
In general, the requirement which I asked is the default functionality of pagination and I hope you aware of.
Even our business people needs the same feature. We are almost few miles away from our actual integration into one of our big project and planning to buy a commercial license to use.
So please help me on this.
Thanks in advance,
\_rssbHi rssb,
The requested feature is not default and is not available in jqxGrid’s API.
You may, however, use Custom Pager to achieve your requirement.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.