jquery easyui 使用带分页的combogrid

jquery easyui 使用带分页的combogrid

$('#shopId').combogrid({  
                    panelWidth:400,                     //设置面板显示的宽度
                    idField:'id',                             //ID字段  
                    textField:'name',                  //显示字段  
                    url:"management/commodityCheck/check_doShopsBySid",  
                    fitColumns: true,              //设置为true将自动使列适应表格宽度以防止出现水平滚动
                    striped: true,                   //表格是否显示条纹间隔
                    editable:true,                 //输入框是否可以编辑
                    pagination : true,          //是否允许分页  
                    rownumbers:true,       //是否显示序号  
                    collapsible:false,        //是否可折叠的  
                    fit: true,                    //自动大小  
                    pageSize: 10,           //每页显示的记录条数,默认为10  
                    pageList: [10],        //可以设置每页记录条数的选择列表  
                    method:'post',  
                    columns:[[  
                        {field:'name',title:'店铺名称',width:150},  
                        {field:'registtime',title:'注册时间',width:150}  
                    ]]  
                });  

后台Action

    private int page; //当前页,名字必须为page  
    private int rows ; //每页大小,名字必须为rows  
      
    private Map<String, Object> typeUsers;  
      
    public String findProducters() {  
        typeUsers=userCheckSvc.findProducters(page,rows);  
        return "combogridjson";  
    }  
      
    public Map<String, Object> getTypeUsers() {  
        return typeUsers;  
    }  
    public int getPage() {  
        return page;  
    }  
    public void setPage(int page) {  
        this.page = page;  
    }  
    public int getRows() {  
        return rows;  
    }  
    public void setRows(int rows) {  
        this.rows = rows;  
    } 

转载于:https://my.oschina.net/ajian2014/blog/325650