- 注册时间
- 2015-7-30
- 最后登录
- 1970-1-1
- 阅读权限
- 10
- 积分
- 59
- 精华
- 0
- 帖子
- 23
|
zhanghang 发表于 2015-7-31 10:18
不报错,但是列显示不出来
var s = [];
for (x in fields) {
s.push('{ field:\'' + x + '\', width: 100, headerAlign: \'center\', header: \'' + x + '\' },');
}
grid.set({
columns: [
s
// { field: "Id", width: 100, headerAlign: "center", header: "Id" }, { field: "GroupId", width: 100, headerAlign: "center", header: "GroupId" }, { field: "ItemName", width: 100, headerAlign: "center", header: "ItemName" }, { field: "ItemValue", width: 100, headerAlign: "center", header: "ItemValue" }, { field: "ItemDese", width: 100, headerAlign: "center", header: "ItemDese" },
//{ field: 'Id', width: 100, headerAlign: 'center', header: 'Id' }, { field: 'GroupId', width: 100, headerAlign: 'center', header: 'GroupId' }, { field: 'ItemName', width: 100, headerAlign: 'center', header: 'ItemName' }, { field: 'ItemValue', width: 100, headerAlign: 'center', header: 'ItemValue' }, { field: 'ItemDese', width: 100, headerAlign: 'center', header: 'ItemDese' }, { field: 'ItemType', width: 100, headerAlign: 'center', header: 'ItemType' }, { field: 'Sorting', width: 100, headerAlign: 'center', header: 'Sorting' }, { field: 'EnableMark', width: 100, headerAlign: 'center', header: 'EnableMark' }, { field: 'Spare1', width: 100, headerAlign: 'center', header: 'Spare1' }, { field: 'Spare2', width: 100, headerAlign: 'center', header: 'Spare2' }, { field: 'Spare3', width: 100, headerAlign: 'center', header: 'Spare3' }, { field: 'Spare4', width: 100, headerAlign: 'center', header: 'Spare4' }, { field: 'ItemTypeName', width: 100, headerAlign: 'center', header: 'ItemTypeName' }, { field: 'ItemTypeValue', width: 100, headerAlign: 'center', header: 'ItemTypeValue' }, { field: 'ItemTypeDesc', width: 100, headerAlign: 'center', header: 'ItemTypeDesc' }, { field: 'CreatorId', width: 100, headerAlign: 'center', header: 'CreatorId' }, { field: 'CreatorName', width: 100, headerAlign: 'center', header: 'CreatorName' }, { field: 'CreateTime', width: 100, headerAlign: 'center', header: 'CreateTime' }, { field: 'EditorId', width: 100, headerAlign: 'center', header: 'EditorId' }, { field: 'EditorName', width: 100, headerAlign: 'center', header: 'EditorName' }, { field: 'EditTime', width: 100, headerAlign: 'center', header: 'EditTime' }, { field: 'DelMark', width: 100, headerAlign: 'center', header: 'DelMark' }, { field: 'CreatorDepId', width: 100, headerAlign: 'center', header: 'CreatorDepId' }, { field: 'TopDepCode', width: 100, headerAlign: 'center', header: 'TopDepCode' }, { field: 'CreatorDepCode', width: 100, headerAlign: 'center', header: 'CreatorDepCode' }, { field: 'CreatorTopDepCode', width: 100, headerAlign: 'center', header: 'CreatorTopDepCode' },
]
}); |
|