this.table = "XXX";
this.firstTxtCol = "XXX";
-
- var map = {
- 'date' : 'date',
- 'datetime' : 'date',
- 'timestamp with time zone' : 'date',
- 'timestamp without time zone' : 'date',
- 'time' : 'string', //bogus
- 'int' : 'int',
- 'integer' : 'int',
- 'bigint' : 'int',
- 'double' : 'float',
- 'tinyint' : 'int',
- 'smallint' : 'int',
- 'decimal' : 'float',
- 'float' : 'float',
- 'numeric' : 'float',
- 'char' : 'string',
- 'character' : 'string',
- 'character varying' : 'string',
- 'varchar' : 'string',
- 'text' : 'string',
- 'longtext' : 'string',
- 'tinytext' : 'string',
- 'mediumtext' : 'string',
- 'enum' : 'string',
- 'timestamp' : 'number',
- 'blob' : 'text',
- 'bytea' : 'text',
- 'boolean' : 'int',
- 'text[]' : 'string',
-
- }
+
var jreader = {};
var colmodel = [];
- this.grid.dataStore.each(function(rec) {
+ this.grid.dataSource.each(function(rec) {
if (!rec.data.active) {
return;
}
colmodel.push({
"xtype": "ColumnModel",
"header": rec.data.title,
- "width": row.data.width * 1,
- "dataIndex": row.Field,
- "|renderer": !row.Type.match(/date/i) ?
+ "width": rec.data.width * 1,
+ "dataIndex": rec.data.dataIndex,
+ "|renderer": !rec.data.type.match(/date/i) ?
"function(v) { return String.format('{0}', v); }" :
"function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }" , // special for date
"|xns": "Roo.grid",