1

我有一个剑道网格,我的分页在服务器端,但过滤器在客户端。
当我更改页码并尝试制作过滤器时,服务器端的分页出现问题,控制器将他的参数“paginator”接收到另一个页码,这是我的代码:

public JsonResult ObtenerFURReporte(string ano_seleccionado, Paginador pagina) {

    try {
        if (ano_seleccionado == null) {
            BoletoAereoBLL boletoBLL = new BoletoAereoBLL();
            var ListaFURReporte = boletoBLL.ObtenerFURReporte(pagina.page, pagina.pageSize, pagina.skip, pagina.take);
            var counter = ListaFURReporte.Item2;
            return Json(new { Result = "OK", Records = ListaFURReporte.Item1, Total = counter }, JsonRequestBehavior.AllowGet);
        } else {
            int anoBuscar = Convert.ToInt32(ano_seleccionado);
            BoletoAereoBLL boletoBLL = new BoletoAereoBLL();
            var ListaFURReporte = boletoBLL.ObtenerFURReportePorAno(anoBuscar);
            var counter = ListaFURReporte.Item2;
            return Json(new { Result = "OK", Records = ListaFURReporte.Item1, Total = counter }, JsonRequestBehavior.AllowGet);
        }

    } catch (Exception ex) {
        return Json(new { Result = "ERROR", Message = ex.Message }, JsonRequestBehavior.AllowGet);
    }
}

在我的 JavaScript 配置中:

serverPaging: true

  scrollable: true,
        selectable: "simple",
        sortable: true,
        resizable: true,
        filterable: {
            extra: false,
            operators: {
                string: {
                    contains: "Contiene"
                }
            }
        },
        pageable: {
            refresh: true,
            pageSizes: true,
            buttonCount: 5
        },
4

0 回答 0