Hi,
I want to take some data from the server and eval it.
if i eval 1 element in the json, it works fine, but if i eval more, i get an error
this is the operation (Using jquery for the ajax):
,getColsFromServer : function(){
return [new Ext.grid.RowNumberer(),
Ext.util.JSON.decode('{"id":"id","dataIndex":"id","header":"ID","width":"20","sortable":"true","editor":{"xtype":"textfield","allowBlank":"false"}},{"dataIndex":"email","header":"Title","width":"120","sortable":"true","editor":{"xtype":"textfield","allowBlank":"false"}}')//,{"id":"pixels","dataIndex":"pixels","header":"pixels","width":"120","sortable":"true","editor":{"xtype":"textarea","allowBlank":"false"}})
];
}
if you take a look, i have 2 columns id+email.
using 2 columns return error:
this.config[col] is undefined
[Break on this error] return this.config[col].width;
usind one column - works fine.
this is the context: i am tring to build my own grid object so this is the usage:
var grid = new Ext.grid.GridPanel({
loadMask: true,
store: store,
margins: '0 5 5 5',
autoExpandColumn: 'id',
plugins: [editor],
tbar: minisites.getTopBar(editor,store,grid),
bbar: minisites.getPagingBar(store , 1),
columns: minisites.getCols()// THIS FUNCTION WILL RETURN THE OBJ FROM THE SERVER USING SYNCED AJAX REQUEST
});
Any idea?