datatable获取自增序号列

var columnsParam = [
        { data: null, width: '10%',defaultContent: "" }]
var columnDefs = [
        {
            targets: 0,
            render: function (data, type, row, meta) {
               return meta.row + 1+ meta.settings._iDisplayStart; 
               //添加这一行就可以了
            }
        }
     ]  

 

你可能感兴趣的:(工具类)