jQuery MiniUI
标题:
mini 加载动态咧
[打印本页]
作者:
yinshilin
时间:
2013-8-15 10:07:27
标题:
mini 加载动态咧
for ( var i = 0; i < len; i++) {
if (keys[i] == "编号") {
columns[i] = {field: keys[i], name: "totalColumn", headerAlign: "center", allowSort: true ,header: keys[i]};
} else {
columns[i] = {field: keys[i], headerAlign: "center", allowSort: true ,header: keys[i], summaryType:"sum"};
}
}
columns[len+1] = {type: 'expandcolumn',headerAlign: "center",header: "详情"};
effect_grid.setColumns(columns);
effect_grid.loadData(data);
我从数据库中动态加载列,现在我想多家一列详情,以上columns[len+1] = {type: 'expandcolumn',headerAlign: "center",header: "详情"};是错误的,不知道怎么写。
作者:
felt
时间:
2013-8-15 10:35:12
var newColumn= {type: 'expandcolumn',headerAlign: "center",header: "详情"};
columns.push(newColumn);
effect_grid.setColumns(columns);
effect_grid.loadData(data);
这样试试
欢迎光临 jQuery MiniUI (http://miniui.com/discuss/)
Powered by Discuz! X2