controller里面:
[HttpPost, SafePermission(SecurityAction.Demand, Model = (int SystemModel.Projectdeclare, Authorizations = (int)Authorization.ReadItem)]
public ActionResult Index(int page, int rows, string sort, string order ,string State)
{
Paginated<RoleModels> _paginated = new Paginated<RoleModels>
(
Repository.GetListRoles(sort, order),
page,
rows
);
return Json(_paginated);
}
Index里面:
$(document).ready(function() {
$('#RoleModels').datagrid({
url: '/Setting/Role/Index/',
sortName: 'Name',
sortOrder: 'desc',
idField: 'ID',
pageSize: 10,
frozenColumns: [[
{ field: 'Name', title: '角色名称', width: 150 }
]],
columns: [[
{ field: 'RoleKind', title: '角色类型', width: 320, align: 'center' },
{ field: 'Description', title: '角色描述', width: 100, align: 'center', sortable: true }
]],
nowrap: true,
striped: true,
border: false,
pagination: true,
rownumbers: true,
singleSelect: true,
height: document.documentElement.clientHeight - 35,
width: document.documentElement.clientWidth
});
});
我的数据库已经存在记录 我想在页面显示 这哪里错了 页面就是不显示啊