我正在使用此代码删除一行
$(document).on("click",
"#deleteSelection${cadenaAleatoria}",
function(){
$('.alertaGrillaResultado').css('display','inherit');
var selectedModels = grid.getSelectedModels();
if(selectedModels != ''){
_.each(selectedModels, function (model) {
model.trigger("backgrid:select", model, false);
var id = grid.collection.fullCollection.where({ id: model.id });
grid.removeRow(id);
$.get("@{delete()}/" + model.id, function (modelos) {
});
$('.alertaGrillaResultado').html(
'<div class="alert alert-success">' + '<button type="button" class="close" data-dismiss="alert">×</button>' + "Se retiro el Tipo de Eventualidad seleccionada" + '</div>'
);
});
collection.fetch({reset:true});
}
$('.alertaGrillaResultado').fadeOut(3000); });
但是当我删除一页的最后一行时,我收到了这个错误:
throw new RangeError(" currentPage
must be firstPage <= currentPage " + (firstPage ? ">" : ">=") + " totalPages if " + firstPage + "-based. Got " + currentPage + '.');
如何更新分页?如何解决这个问题?