easyui datagrid生成序号列formatter

时间:2019-10-14 12:44:16   收藏:0   阅读:469
var opts1;
$(‘#datagrid_1‘).datagrid({
    columns: [
        [{
                field: ‘myNo‘,
                title: ‘序号‘,
                align: ‘center‘,
                width: 100,
                formatter: function (value, row, index) {
                    if (!opts1) {
                        opts1 = $(‘#datagrid_1‘).datagrid(‘options‘);
                    }
                    return opts1.pageSize * (opts1.pageNumber - 1) + index + 1;
                }
            }
        ]
    ]
});

 

原文:https://www.cnblogs.com/yeminglong/p/11670376.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!