ajax请求时传了页数和每页条数,怎么和easyui的分页联动起来


<table class="easyui-datagrid datagridshow" data-options="toolbar:'#toolbar',pagination: true,striped: true,singleSelect: true,striped: true,fitColumns: true,singleSelect: true,pagination: true,rownumbers: false,pageSize: 20,pageList: [5, 10, 15, 20, 30]" style="width:100%;height:100%;" id="datagrid">
                <thead>
                    <tr>
                        <th data-options="field:'DeviceCode',align:'center'" style="width:20%">ip_addr</th>
                        <th data-options="field:'DeviceName',align:'center'" style="width:25%">name</th>
                        <th data-options="field:'DeviceState',align:'center'" style="width:10%">在线状态</th>
                        <th data-options="field:'HouseName',align:'center'" style="width:25%">所在房间</th>
                        <th data-options="field:'FloorName',align:'center'" style="width:20%">所在楼层</th>
                    </tr>
                </thead>
            </table>
<script>
function GetDevList() {
$.ajax({
            type: "post",
            url: postUrl,
            beforeSend: function (xhr) {
                //发送ajax请求之前向http的head里面加入验证信息
                xhr.setRequestHeader("token", fnGetAuth());  // 请求发起前在头部附加token
            },
            data: {
                PageSize: 10,
                PageCurrent: 1,
                Where: [
                    {
                        ColumnName: "DeviceDefineID",
                        Condition: 1,
                        ColumnValue: 13
                    },
                ]
            },
            dataType: "json",
            success: function (data) {
                console.log(data);
                if (data.Code == "1001") {
                    //console.log(data.Data.PageList);
                    $('.datagridshow').datagrid({
                        data: data.Data.PageList
                    });var pager = $(".datagridshow").datagrid("getPager"); //获取表格
                    pager.pagination({
                        total: res.Data.AllCount,
                    });
                }
                else {
                    alert(data.Code);
                }

            },
            error: function (XMLHttpRequest, textStatus, errorThrown) {
                console.log("请求错误" + XMLHttpRequest.status);
            }
}
</script>

img

动态修改pageination的参数吗?有refresh方法

var pager = $(".datagridshow").datagrid("getPager"); //获取表格
pager.pagination(('refresh',{    
    total: res.Data.AllCount,
    pageSize: 10
}););