根据Dynamic Grid重新整理了一个适合在extjs2.2版本下使用的动态editGridPanel。 代码如下: Ext.grid.DynamicColumnModel = function(store){ var cols = []; var recordType = store.reader.recordType; var fields = recordType.prototype.fields; if (fields.length == 0) { fields = store.reader.headers; for (var i = 0; i < store.reader.headers.length; i++) { var header = store.reader.headers[i] cols[i] = { header: header.text, dataIndex: header.name, tooltip: ”, hidden: header.hidden, renderer: eval(header.renderer) }; } } else { for (var i = 0; i < fields.keys.length; i++) { var fieldName = fields.keys[i]; //add checkbox column if (fieldName == [...]
extjs动态editorGridPanel(2.2)
最新推荐文章于 2021-02-01 03:23:52 发布