PDA

View Full Version : [FIXED][3.x] Can't specify endGroup in GroupingView config



Condor
7 Dec 2009, 8:35 AM
You can specify a different startGroup template, but not a different endGroup in the GroupingView config.

The code should be:

Ext.override(Ext.grid.GroupingView, {
initTemplates : function(){
Ext.grid.GroupingView.superclass.initTemplates.call(this);
this.state = {};
var sm = this.grid.getSelectionModel();
sm.on(sm.selectRow ? 'beforerowselect' : 'beforecellselect',
this.onBeforeRowSelect, this);
if(!this.startGroup){
this.startGroup new Ext.XTemplate(
'<div id="{groupId}" class="x-grid-group {cls}">',
'<div id="{groupId}-hd" class="x-grid-group-hd" style="{style}"><div class="x-grid-group-title">', this.groupTextTpl ,'</div></div>',
'<div id="{groupId}-bd" class="x-grid-group-body">'
);
}
this.startGroup.compile();
if(!this.endGroup){
this.endGroup = '</div></div>';
}
}
});

Jamie Avins
7 Dec 2009, 9:39 AM
Added in 5743.