我正在使用此代码删除行
$(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')淡出(3000)。 });
但是当我删除一页的最后一行时 我收到这个错误:
抛出新的RangeError(“currentPage
必须是firstPage&lt; = currentPage”+
(firstPage?“&gt;”:“&gt; =”)+
“totalPages if”+ firstPage +“ - based。得到了”+
currentPage +'。');
如何更新分页?如何解决这个问题?