createRecord function var record var data Ext each this columns functi

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
,createRecord:function(){
var record = {};
var data = {};
Ext.each(this.columns,function(o){
record[record.length] = {name:o.dataIndex, type:o.type};
if( o.dataIndex ){
data[o.dataIndex] = '';
}
});
var newRec = Ext.data.Record.create(record);
return new newRec(data);
}