PDA

View Full Version : [ExtJS 4.2.1]Problem with RowBody feature



wojteks27
4 Jun 2014, 4:35 AM
Hi guys,

I have a problem and can't get RowBody feature to work in 4.2.1.833.

I couldn't find any info on whether it is a bug or not, but as for me I doesn't work even on Sencha's example page (http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.grid.feature.RowBody).

49216

Just now I managed to get it working by using ExtJS 5.0.0 setupRowData style.



features: [{
ftype: 'rowbody',
setupRowData: function(record, rowIndex, rowValues) {
var headerCt = this.view.headerCt,
colspan = headerCt.getColumnCount();

// Usually you would style the my-body-class in CSS file
Ext.apply(rowValues, {
rowBody: '<div style="padding: 1em">'+record.get("annotations")+'</div>',
rowBodyCls: "my-body-class",
rowBodyColspan: colspan
});
}
}],



instead of this (which is taken straight from 4.2.1.833 docs):


features: [{
ftype: 'rowbody',
setupRowData: function(record, rowIndex, rowValues) {
var headerCt = this.view.headerCt,
colspan = headerCt.getColumnCount();

// Usually you would style the my-body-class in CSS file
return {
rowBody: '<div style="padding: 1em">'+record.get("annotations")+'</div>',
rowBodyCls: "my-body-class",
rowBodyColspan: colspan
};
}
}]


Can someone tell me why is it happening?

Gary Schlosberg
12 Jun 2014, 5:50 AM
Guessing the issue was identified and fixed, but we need more info to confirm. Can you elaborate on the problem you are seeing?

wojteks27
12 Jun 2014, 6:09 AM
The problem is, that when I use syntax provided by 4.2.1 docs the RowBody stays empty (vide picture I uploaded in previous post), but when I use 5.0.0 syntax (instead of returning object from setupRowData, I apply it to rowValues variable) everything works fine and rowBody gets populated.

I encoutered it in my app and tried to verify my syntax with online docs, but the problem occured there too.
I tried Chrome, Firefox, Safari and then run XP on vbox and tried IE, Chrome and Firefox but the problem was present.

Please tell me what info you would like me to provide and I'll gladly help.

Are you not seeing this issue?