easy-ui datagrid

Easy-ui引用
    <link href="css/EasyUI/themes/icon.css" rel="stylesheet" type="text/css" />
    <link href="css/EasyUI/themes/default/easyui.css" rel="stylesheet" type="text/css" />
    <link href="css/EasyUI/demo.css" rel="stylesheet" type="text/css" />

    <script src="js/jq/jquery-1.8.0.min.js" type="text/javascript"></script>
    <script src="js/EasyUI/jquery.easyui.min.js" type="text/javascript"></script>
 

$('#tt').datagrid({
            //标题
            title: 'Frozen Columns',
            //标题左上角的图标
            iconCls: 'icon-save',
            //宽高
            width: 1000,
            height: 250,
            //表头(title)上的工具栏
            //toolbar: '#aa',
            method: 'get',
            //最左边序号
            rownumbers: true,
            //选中单行(变成黄色)
            singleSelect: true,
            //锁定行(json中的foot)
            showFooter: true,
            //控制分页↓
            pageList: [10, 20, 50],
            collapsible: true,
            pagination: true,
            //控制分页↑
            loadMsg: "数据读取中......",
            url: 'datagrid_dataF.json',
         //锁定列(冻结列)
            frozenColumns: [[
                        { field: 'itemid', title: '操作', width: 40, formatter: function(value, row, index) {
                            var edit = "";
                            //                            if (row.editing) {
                            var del = "<a style=\"cursor:pointer\" οnclick=\"delRow(" + index + ")\"><img src=\"image/cross.png\" alt=\"删除\" /></a>";
                            return edit + "&nbsp;&nbsp;" + del;
                            //                            }
                            //                            else {
                            //                                var del = "<a style=\"cursor:pointer\" οnclick=\"delRow(" + index + ")\"><img src=\"~/image/cross.png\" alt=\"删除\" /></a>";
                            //                                return edit + "&nbsp;&nbsp;" + del;
                            //                            }
                        }
                        },

                       ]],
            columns: [[
                        { field: 'chbm', title: '存货编码', align: 'center', width: 100 },
                        { field: 'chmc', title: '存货名称', align: 'center', width: 100 },
                        { field: 'ysdm', title: '颜色代码', align: 'center', width: 100 },
   { field: 'ysmc', title: '颜色名称', align: 'center', width: 100 },
   { field: 'dw', title: '单位', align: 'center', width: 100 },
   { field: 'sl', title: '数量', align: 'center', width: 100 },
   { field: 'hsdj', title: '含税单价', align: 'center', width: 100 },
   { field: 'hsje', title: '含税金额', align: 'center', width: 100 },
   { field: 'qsdj', title: '去税单价', align: 'center', width: 100 },
   { field: 'qsje', title: '去税金额', align: 'center', width: 100 },
   { field: 'se', title: '税额', align: 'center', width: 100 },
   { field: 'dlmc', title: '大类名称', align: 'center', width: 100 },
   { field: 'jh', title: '集合', align: 'center', width: 100 },
   { field: 'glspdm', title: '关联商品代码', align: 'center', width: 100 },
   { field: 'glspmc', title: '关联商品名称', align: 'center', width: 100 },
   { field: 'jj', title: '季节', align: 'center', width: 100 },
   { field: 'js', title: '结算', align: 'center', width: 100 }
                       ]]
        });

 

设置(冻结行)
   List<object> footer = new List<object>();
          footer.Add(new{列名1=数据1,列名2=数据2}); 

转载于:https://www.cnblogs.com/holyson/p/3291182.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值