Hi I use in my project bootgrid I did custom lenght dropdown, evrithing is working apart the table pagination Is there a whay this to be fixed? Here is my code:
var $table = $("#data-table");
$table.bootgrid({
ajax: true,
url : 'myfancyurl',
columnSelection : false,
templates: {
//header: "" //Removes default bootgrid header
},
css : {
icon: 'md icon',
iconColumns: 'md-view-module',
iconDown: 'md-expand-more',
iconRefresh: 'md-refresh',
iconUp: 'md-expand-less'
},
labels :{
all:'',
loading:''
},
requestHandler: function (request) {
request.searchPhrase = $("#search-phrase").val();
request.rowCount = parseInt($('#row-count li.active').text());
return request;
}
}
});
$('#row-count li').on('click', function(e){
$('#row-count li').removeClass('active');
$(this).addClass('active');
$('.row-count').text( $(this).text() );
$table.bootgrid("reload");
});
So when I change lenght on backend side works fine, but the bootgrid doesn't recalc pagination when I pass the rowCount from request. Thanks in advance if someone can help.