首先在<thead>中加入
<th data-options="field:‘rowNumber’,formatter:formatId">序号</th>
然后在js中定义fomatId这个方法
Function formatId(){
Var op=$("#你自己easyui表格的名字").
datagrid(‘options’);
return op.pageSize*(op.pageNnumber-1
)+(index+1);
}
首先在<thead>中加入
<th data-options="field:‘rowNumber’,formatter:formatId">序号</th>
然后在js中定义fomatId这个方法
Function formatId(){
Var op=$("#你自己easyui表格的名字").
datagrid(‘options’);
return op.pageSize*(op.pageNnumber-1
)+(index+1);
}
转载于:https://my.oschina.net/u/3459265/blog/1829420