PDA

View Full Version : RowExpander - template is not rendered



Vovan81
28 Jan 2014, 1:28 AM
Hello!

On ExtJS 4.2 (FF 26) I run into the strange situation when clicking on "expand" button on the task list does not produce desired effect. My code:



plugins: [cellEditing,
{
ptype: 'rowexpander',
rowBodyTpl : ['<div id="ux-row-expander-box-{Id}">{Name}</div>']
}
]


And expandbody handler:



g.view.on('expandbody', function(rowNode, record, expandRowNode) {
alert("coming here");
var divv = Ext.get('ux-row-expander-box-' + record.data.Id);
divv.setHTML('Content that I cannot see');
});


Alert box is fired, divv is assigned to what expected (ux-row-expander-box-344), but the text "Content that I cannot see" just doesn't show up. The expandable row just growth in height by some pixels but no text is shown.

Any ideas?
Thanks a lot!
Vovan

Farish
28 Jan 2014, 2:18 AM
try refreshing the view. In my case, I have placed a grid inside the expander and I have to call grid.getView().refresh() on expand so that the right data is displayed. otherwise, sometimes it shows the values from the last expanded row...

also remove cellediting plugin for the moment so that you can see if that is causing any interruptions.