-
23 Jun 2010 1:00 AM #1
Cannot use a Ext.form.CompositeField as a cell editor in Ext.grid.EditorGridPanel
Cannot use a Ext.form.CompositeField as a cell editor in Ext.grid.EditorGridPanel
The error occurs in the doLayout function in Ext.form.CompositeField since the field doesnt have an ownerContainer when it is used as a cell editor.
The doLayout function in Ext.form.CompositeField(this.ownerCt is undefined):
By doing this, it works in my case:Code:doLayout: function(shallow, force) { if (this.rendered) { var innerCt = this.innerCt; innerCt.forceLayout = this.ownerCt.forceLayout; innerCt.doLayout(shallow, force); } }
Any thoughts?Code:doLayout: function(shallow, force) { if (this.rendered) { var innerCt = this.innerCt; if (this.ownerCt) { innerCt.forceLayout = this.ownerCt.forceLayout; } innerCt.doLayout(shallow, force); } }
-
4 Feb 2013 1:15 PM #2
This also worked for me expect for internet Explorer (no surprise there). In order to get it to work with IE I needed to set the editors allowBlur to false; which i did via an override. Without this override the editor would appear, but if you clicked on the cell again it would disappear.
Code:Ext.override(Ext.Editor, { allowBlur: false });
-
22 Apr 2013 1:04 AM #3
Messing with ExtJs sources is not a good idea. You can forbid compostiefield to call doLayout by setting event beforeshow and return false. So lets see it on example:
And you are good to go.Code:Ext.getCmp('id_of_your_compositefield').on('beforeshow', function() { return false; });
Similar Threads
-
Ext.grid.EditorGridPanel column header and Ext.form.TextArea text alignment..
By baven in forum Ext 3.x: Help & DiscussionReplies: 0Last Post: 18 Jun 2010, 12:54 PM -
[CLOSED] Ext.grid.EditorGridPanel editor doesn't select row
By mitchellsimoens in forum Ext 3.x: BugsReplies: 3Last Post: 28 Feb 2010, 10:31 AM -
EditorGridPanel > editor: > How to make the editor dynamic for each cell
By srajakaruna in forum Ext 2.x: Help & DiscussionReplies: 9Last Post: 9 Oct 2008, 7:53 AM -
Showing grid's cell editor in Ext.Window
By nthamizhan in forum Ext 2.x: Help & DiscussionReplies: 6Last Post: 16 Aug 2008, 8:29 AM



Reply With Quote