Skip to content

Instantly share code, notes, and snippets.

@jjulian
Created November 10, 2009 15:03
Show Gist options
  • Save jjulian/230929 to your computer and use it in GitHub Desktop.
Save jjulian/230929 to your computer and use it in GitHub Desktop.
/*
* Extends PanelRowExpander to show an edit panel in the expansion instead of an ExtTemplate.
*/
MyApp.MyRowExpander = function(config){
Ext.apply(this, config);
MyApp.MyRowExpander.superclass.constructor.call(this);
};
Ext.extend(MyApp.MyRowExpander, Ext.grid.PanelRowExpander, {
createExpandingRowPanelItems: function( record, rowIndex ) {
var p = new Ext.form.FormPanel({
idSuffix: 'expand-'+record.id,
border: false,
height: Math.max(Ext.getCmp('Mysgridpanel').getInnerHeight() * 0.5, 150),
hideTitles: true,
html: 'My form!'
});
p.on('close', function() {
this.collapseRow(rowIndex);
}, this);
return [p];
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment