Created
November 10, 2009 15:03
-
-
Save jjulian/230929 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 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