PDA

View Full Version : How to add expandable row (collapsable grid) to a portal



ianrathbone
9 May 2012, 2:58 AM
Hi there,
I'm new to Sencha and I've been working through some of the examples.

What I'm trying to do at the moment is use the portal code from the example:
http://dev.sencha.com/deploy/ext-4.0.0/examples/portal/portal.html

(http://dev.sencha.com/deploy/ext-4.0.0/examples/portal/portal.html)And use an expandable row from here:
http://dev.sencha.com/deploy/ext-4.0.2a/examples/grid/grid-plugins.html

(http://dev.sencha.com/deploy/ext-4.0.2a/examples/grid/grid-plugins.html)However I'm not able to expand or collapse the row. I can't for the life of me see what I'm doing wrong!!

35025

The plus / minus button does work and I see this error "cannot call method 'addcls' of null" in the javascript console.

The code looks like this:


Ext.apply(this, {
//height: this.height,
store: store,
columns: [
{text: "Company", flex: 1, dataIndex: 'company'},
{text: "Price", renderer: Ext.util.Format.usMoney, dataIndex: 'price'},
{text: "Change", dataIndex: 'change'},
{text: "% Change", dataIndex: 'pctChange'},
{text: "Last Updated", renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex: 'lastChange'}
],
width: 600,
height: 300,
plugins: [{
ptype: 'rowexpander',
rowBodyTpl : [
'<p><b>Company:</b> {company}</p><br>',
'<p><b>Price:</b> {pctChange}</p>'
]
}]
});

edykstra
7 Jun 2012, 11:16 AM
For what it is worth ... I have the EXACT same issue.

Hopefully someone will chime in with a fix?