Example.grid.Artworks = function(config) {
config = config || {};
Ext.applyIf(config,{
id: 'example-grid-artworks'
,url: Example.config.connectorUrl
,baseParams: { action: 'mgr/example/getListArtworks' }
,fields: ['id','name','description','menu']
,paging: true
,pageSize: 5
,remoteSort: true
,autoExpandColumn: 'description'
,columns: [{
header: _('id')
,dataIndex: 'id'
},{
header: _('example.artwork_name')
,dataIndex: 'name'
},{
header: _('example.artwork_desc')
,dataIndex: 'name'
}]
});
Example.grid.Artworks.superclass.constructor.call(this,config)
}
Ext.extend(Example.grid.Artworks,MODx.grid.Grid);
Ext.reg('example-grid-artworks',Example.grid.Artworks);
This question has been answered by muzzstick. See the first response.
Example.grid.Artworks = function(config) {
config = config || {};
// ---- This gets added here ------
this.exp = new Ext.grid.RowExpander({
tpl : new Ext.Template(
'<p>{expandedcontent}</p>'
)
});
Ext.applyIf(config,{
id: 'example-grid-artworks'
,url: Example.config.connectorUrl
,baseParams: { action: 'mgr/example/getListArtworks' }
,fields: ['id','name','description','menu']
,paging: true
,pageSize: 5
,remoteSort: true
,autoExpandColumn: 'description'
,plugins: [this.exp] // <---- add this here
,columns: [this.exp,{ // <----- add this here
header: _('id')
,dataIndex: 'id'
},{
header: _('example.artwork_name')
,dataIndex: 'name'
},{
header: _('example.artwork_desc')
,dataIndex: 'name'
}]
});
Example.grid.Artworks.superclass.constructor.call(this,config)
}
Ext.extend(Example.grid.Artworks,MODx.grid.Grid);
Ext.reg('example-grid-artworks',Example.grid.Artworks);

Example.grid.Artworks = function(config) {
config = config || {};
// ---- This gets added here ------
this.exp = new Ext.grid.RowExpander({
tpl : new Ext.Template(
'<p>{expandedcontent}</p>'
)
});
Ext.applyIf(config,{
id: 'example-grid-artworks'
,url: Example.config.connectorUrl
,baseParams: { action: 'mgr/example/getListArtworks' }
,fields: ['id','name','description','expandedcontent','menu'] // <--- added the expandedcontent field here
,paging: true
,pageSize: 5
,remoteSort: true
,autoExpandColumn: 'description'
,plugins: [this.exp] // <---- add this here
,columns: [this.exp,{ // <----- add this here
header: _('id')
,dataIndex: 'id'
},{
header: _('example.artwork_name')
,dataIndex: 'name'
},{
header: _('example.artwork_desc')
,dataIndex: 'name'
}]
});
Example.grid.Artworks.superclass.constructor.call(this,config)
}
Ext.extend(Example.grid.Artworks,MODx.grid.Grid);
Ext.reg('example-grid-artworks',Example.grid.Artworks);