sudama.patidar_1 Posted July 13, 2016 Share Posted July 13, 2016 I am not able to enable/disable next and previous pagination buttons. it works fine for first time but when i refine report again then it doesnt work as expected. Below is code ;Visualize js Code :reportCompleted: function (status) { if(report.data().totalPages > 1){ $('#nextPage').removeClass('not-active'); }else{ $('#nextPage').addClass('not-active'); } if(report.pages() == 1){ $('#prevPage').addClass('not-active'); }else{ $('#prevPage').removeClass('not-active'); } if(report.pages() == report.data().totalPages){ $('#nextPage').addClass('not-active'); } }Pagination Code : $("#prevPage").click(function () { var currentPage = report.pages() || 1; report.pages(--currentPage).run() .fail(function (err) { }); }); $("#nextPage").click(function () { var currentPage = report.pages() || 1; report.pages(++currentPage).run() .fail(function (err) { }); }) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now