Hi,
We are using JQX grid to display data and the data to the grid is bound dynamically (loadServerData), and based on no of rows returned, we should hide/show pagination strip at the bottom of the grid.
So I have added the below code to my “bindingcomplete” event:-
$(‘#AMS_jqxgrid’).on(‘bindingcomplete’, function (event) {
// apply localization.
$(“#AMS_jqxgrid”).jqxGrid(“localizestrings”, localizationobj);
if (source.totalrecords <= 200) {
$(“#AMS_jqxgrid”).jqxGrid({ pageable: false });
}
else {
$(“#AMS_jqxgrid”).jqxGrid({ pageable: true });
EnableDisablePreviousNextButtonsOfJQXGrid();
}
});
Hiding/Showing of the Pagination strip works great but, ajax call to get/bind data is made twice instead of once. First when we are initially loading the page and second time when we are setting the pageable property in “bindingcomplete” event.
Can we avoid the second call, but still have my logic for hiding and showing the Pagination strip?
Thanks,
Indu.