码迷,mamicode.com
首页 > 其他好文 > 详细

Eaysui Datagrid 隐藏标题 分页及后台显示数据

时间:2015-07-06 15:45:31      阅读:138      评论:0      收藏:0      [点我收藏+]

标签:

     <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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!