jQuery MiniUI
标题:
如何绘制序号
[打印本页]
作者:
xk_lb
时间:
2022-3-24 14:58:05
标题:
如何绘制序号
[attach]13538[/attach]分组后,如何让序号重新排序?
作者:
felt
时间:
2022-3-24 15:45:27
grid.on("drawcell", function (e) {
if (e.column.type == "indexcolumn") {
var groups = this.getGroupingView()
var record = e.record;
var index = 0;
for (var i = 0, l = groups.length; i < l; i++) {
var gp = groups[i];
for (var j = 0, k = gp.rows.length; j < k; j++) {
if (record == gp.rows[j]) {
index = j;
break;
}
}
}
e.cellHtml = index+1;
}
})
复制代码
欢迎光临 jQuery MiniUI (http://miniui.com/discuss/)
Powered by Discuz! X2