Clay Banks
Clay Banks

Reputation: 4591

RowExpander not working on grid - Ext JS 4.1.1

I have the panel here that displays fine until i try to implement the rowexpander plugin:

Ext.define('AM.view.userlist.List' ,{
    extend: 'Ext.grid.Panel',
    alias: 'widget.userlist',
    title: '<center>Results</center>',
    store: 'User', 
    collapsible: true,
    plugins: [{
            ptype: 'rowexpander',
        id: 'rowexpander',
            rowBodyTpl : [
                '<p>Name <b>{name}</b></p>',
                '<p><b>Address {address}</b></p>'
            ]
        }],
        collapsible: true,
        animCollapse: false,
    initComponent: function() {
        this.columns = [
            {header: 'ID',  dataIndex: 'id', flex: 4, tdCls: 'grid_cell'},
            {header: 'Name', dataIndex: 'name', flex: 4, tdCls: 'grid_cell'},
            {header: 'Address', dataIndex: 'address', flex: 3, tdCls: 'grid_cell'},
            {header: 'Phone', dataIndex: 'phone', flex: 3, tdCls: 'grid_cell'}
         ];
    this.callParent(arguments);
    //remaining code...

When i attempt to add the plugin, I get this exception:

TypeError: name is undefined

I'm not sure why I can't get it to work. Any ideas?

Upvotes: 0

Views: 677

Answers (1)

Vlad
Vlad

Reputation: 3645

Try:

...
requires: [
    'Path.to.RowExpander'
],
...

Upvotes: 2

Related Questions