jquery bootgrid 获取被选择的复选框,怎么只能拿到当前页面的

$("#gridrole").bootgrid({
pagination : 3,
selection : true,
multiSelect : true,
ajax : true,
post : function() {
},
url : "${ctx}/SysRoleController/getSysRoleList",
formatters : {
"id" : function(column, row) {
return ""+row.id+"";
}
},
});

$(".roleId").each(function() {
        console.log(this);
        if (this.checked) {
            if (typeof ($(this).val()) != "undefined") {
                roleIds += "," + $(this).val();
            }
        }
    });
    roleIds只拿到了当前页面checked的,如何拿到多个页面被选择的值

自己用全局遍历记住分页前的其他已经勾选的值。没用过,应该和easyui datagrid一样,分页后只能是当前页的,前他页需要自己记录

如何记录@showbo