标签:
<div data-options="region:‘north‘" style="height: 70%; width: 100%"> <table id="Listyx" style="width: 100%; height: 100%;"> <thead> <tr> <th data-options="field:‘Id‘" hidden="hidden">Id</th> <th data-options="field:‘Chinesename‘,width:100,align:‘center‘">中文名</th> <th data-options="field:‘Englishname‘,width:100,align:‘center‘">英文名</th> <th data-options="field:‘Seq‘,width:100,align:‘center‘">序号</th> </tr> </thead> </table> </div> $(‘#dg‘).datagrid({ showHeader:false,//是否显示标题 url: ‘/ShipManagerment/GetOrdersList‘, rownumbers: true, singleSelect: true, pagination: true, //显示分页
pageSize: 5, //每页显示条数 striped: true, iconCls: ‘icon-edit‘, toolbar: ‘#tb‘, fit: true, onDblClickRow: onDblClickRow }); $(‘#Listyx‘).datagrid(‘load‘, { Name: Yx, Type: Typea });
后台:
public JsonResult GetOrdersList(string DDH, string TDH, string XH, string YSFS, DateTime? BT, DateTime? ET, string QYPortId, string MDPort) { try { string GroupId = new UserManage().GetGroupId(); int PageNum = string.IsNullOrEmpty(Request["page"]) ? 1 : int.Parse(Request["page"]); int Take = string.IsNullOrEmpty(Request["rows"]) ? 20 : int.Parse(Request["rows"]); int Skip = Take * (PageNum - 1); int Count = 0; List<DTO_Orders_Sample> list = _ordersManagement.GetTuoShuList(DDH, TDH, XH, YSFS, BT, ET, QYPortId, MDPort, Skip, Take, out Count); return Json(new { rows = list, total = Count }, JsonRequestBehavior.AllowGet); } catch (Exception ex) { return Json(ex.Message, JsonRequestBehavior.AllowGet); } }
Eaysui Datagrid 隐藏标题 分页及后台显示数据
标签:
原文地址:http://www.cnblogs.com/easyJob/p/4624349.html