如何在更改下一页时不丢失jqxGrid中的过滤器?我正在使用dataAdapter中的过滤器

时间:2017-11-16 18:06:53

标签: jqxgrid

我有一个问题,我使用这个控件是一个jqxGrid,这是:

function initGridUsuarios(){

        // campos y adaptador
        var fields = [
                { name: "NoEmpleado", type: "int" },
                { name: "Nombre", type: "string" },
                { name: "Departamento", type: "string" }

        ],
            dataAdapter = utils.generateGridAdapter(gridEmpleados, "GestionPaqueteInfo", "ObtenerGridUsuarios", fields, getGridFilters);

        gridEmpleados.jqxGrid({
            width: 900,
            height: 400,
            theme: tema,
            columnsresize: true,
            pageable: true,
            altrows: true,
            virtualmode: true,
            rendergridrows: function () {
                return dataAdapter.records;
            },
            localization: utils.getIdiomaGrid(),
            source: dataAdapter,
            columns: [
                { text: "Id", dataField: "Id", columngroup: "Titulo", width: 100, hidden: true },
                { text: "Número de Empleado", dataField: "NoEmpleado", columngroup: "Titulo", width: 150 },
                { text: "Nombre", dataField: "Nombre", columngroup: "Titulo", width: 250 },
                { text: "Departamento", dataField: "Departamento", columngroup: "Titulo", width: 350 },


                {
                    text: "Crear paquete info", datafield: "Crear", columngroup: "Titulo", columntype: "button", width: 150, cellsrenderer: function () {
                        return "Crear";
                    }, buttonclick: function (clickRow) {
                        crear();
                    }
                },

            ],
            columngroups: [
                { text: "Busqueda de Empleados para creación de paquete inventario informática", align: "center", name: "Titulo" }
            ]
        });
    }

实际上它松了过滤器,当我更改页面时,我该怎么办才能不丢失过滤器?

:对不起我的英语不太好:$:$

0 个答案:

没有答案