Code:
initComponent: function ()
{
EpisodeGrid.superclass.initComponent.call(this);
this.configureEpisodeGrid();
},
configureEpisodeGrid: function ()
{
// replace the grid view config
this.viewConfig =
{
emptyText: 'No episodes found.',
forceFit: true,
enableRowBody: true,
narrativeMode: 'full',
getRowClass: this.getNarrativeRowClass
};
// setup grid column model config, including the RowActions column
this.getColumnModel().setConfig([
{
xtype: 'gridcolumn',
header: 'ID',
dataIndex: 'ID',
width: 75,
resizable: false,
fixed: true,
id: 'EpisodeID'
}, {
xtype: 'gridcolumn',
header: 'Title',
dataIndex: 'Title',
id: 'EpisodeTitle'
}, {
xtype: 'gridcolumn',
header: 'WFO',
dataIndex: 'WFO',
sortable: true,
width: 75,
hidden: true,
resizable: false,
fixed: true,
id: 'WFO'
}, {
xtype: 'gridcolumn',
header: 'Begin Date',
sortable: true,
width: 100,
fixed: true,
dataIndex: 'BeginDateTime',
id: 'BeginDateTime'
}, {
xtype: 'gridcolumn',
header: 'End Date',
sortable: true,
width: 100,
fixed: true,
dataIndex: 'EndDateTime',
id: 'EndDateTime'
}, {
xtype: 'actioncolumn',
header: '',
width: 30,
resizable: false,
fixed: true,
menuDisabled: true,
items: [
{
iconCls: 'iconDeleteAction',
tooltip: 'Delete Episode',
handler: this.handleDeleteColumnClick,
scope: this
}]
}]);
// assign a new selection model with a single row select and add a listener
this.selModel = new Ext.grid.RowSelectionModel({ singleSelect: true });
this.getSelectionModel().on('rowselect', this.onEpisodeGridRowSelect, this);
// add grid listeners
this.on('rowdblclick', this.onEpisodeGridRowDblClick, this);
// add EpisodeStore listeners
this.store.on('beforeload', this.onEpisodeStoreBeforeLoad, this);
this.store.on('datachanged', this.onEpisodeStoreDataChanged, this);
},
Anyone have a hint or two on what's going on here?