PDA

View Full Version : [FIXED-1151 3.3.x rev 6947] GroupingView renderUI bug



maksimenko
26 Jul 2010, 7:26 AM
Hello,

I don't know if we are or not supposed to report bugs on svn code, in case we aren't, just tell me and I won't do it in the future.

After the grid refactoring, the 'Show in groups' & 'Group by this field' options in the column menu wasn't showing, after a quick look, the options are being added on the 'renderUI' method of GroupingView.js, but the "this.hmenu" property isn't available until the afterRenderUI of the GridView.js lifecycle...

For now, I just have this override on my code


Ext.override(Ext.grid.GroupingView, {
afterRenderUI: function () {
Ext.grid.GroupingView.superclass.afterRenderUI.call(this);

if(this.enableGroupingMenu && this.hmenu){
this.hmenu.add('-',{
itemId:'groupBy',
text: this.groupByText,
handler: this.onGroupByClick,
scope: this,
iconCls:'x-group-by-icon'
});
if(this.enableNoGroups){
this.hmenu.add({
itemId:'showGroups',
text: this.showGroupsText,
checked: true,
checkHandler: this.onShowGroupsClick,
scope: this
});
}
this.hmenu.on('beforeshow', this.beforeMenuShow, this);
}
}
});
so it tries adding the grouping options after the hmenu is created on the gridview and everything is working fine...

Let me know if you need me to provide more information

Thanks

edspencer
27 Jul 2010, 11:09 AM
Thanks for the patch, I've applied it to 3.3.