easyui中给table列表中加序号

 

 

$('#xyData_healthList').datagrid({
width: 'auto',
height: 'auto',
striped: true,
fit: true,
pagination: true, scrollbarSize: 0,
singleSelect: true,
url: '<%=basePath%>xyData/health/getList.do?company_id=' + '<%=company_id%>' + '&usr_no=' + '<%=user_no%>',
loadMsg: '数据加载中请稍后……',
columns: [[
{
field: 'id',
title: '序号',
align: 'center',
resizable: false,
width: '10%',
formatter: function (value,index) {
return $("#xyData_healthList").datagrid("getRowIndex",index) +1;
}
},

posted @ 2020-01-14 14:58  红尘沙漏  阅读(2243)  评论(0编辑  收藏  举报