PDA

View Full Version : [UNKNOWN][3.0.0/2.x] Field Height Ignored in editorgrid



jkamke
20 Aug 2008, 3:47 PM
It is quite simple, using either the height config option or by specifying the style:"height:..." on the field does not work.

I can set overflow-y:visible on the field but that stops working in ie once the height of the field grows beyond the border of the grid.
Nothing seems to help in ff.


var view = new Ext.Viewport({
layout: "anchor",
items: [
{
tbar:[{
text: 'Insert',
listeners: {
'click': {
fn: function(){
var rec = new Record({caseId:1,noteText:''});
Ext.StoreMgr.get('myStore').add(rec);
},
scope: this
}
}
}],
id:"myGrid",
xtype: "editorgrid",
sm: new Ext.grid.RowSelectionModel(),
store: new Ext.data.SimpleStore({storeId :'myStore',fields:['noteId','loginName','noteText']}),
height:500,
columns: [
{
header: "Id",
dataIndex: "noteId"
}, {
header: "Login",
dataIndex: "loginName"

},
{
header: "Text",
width:500,
dataIndex: "noteText",
editor: new Ext.form.TextArea({height:200})
}]
}]
});

Condor
20 Aug 2008, 10:12 PM
This helps:


Ext.override(Ext.Editor, {
doAutoSize : function(){
if(this.autoSize){
var sz = this.boundEl.getSize(), fs = this.field.getSize();
switch(this.autoSize){
case "width":
this.setSize(sz.width, fs.height);
break;
case "height":
this.setSize(fs.width, sz.height);
break;
case "none":
this.setSize(fs.width, fs.height);
break;
default:
this.setSize(sz.width, sz.height);
}
}
}
});

(I also thought a 'none' option could also be useful)

jkamke
21 Aug 2008, 9:05 AM
Thanks, it helps quite a bit.

mystix
19 Feb 2009, 8:10 PM
[ timely bump ]

pcrombach
14 Mar 2009, 4:26 PM
Maybe Condor listens tot this thread. As I said this works fine. But the height of the editor is changed every tiem I call the inline editor. I watched the sizes in firefox. Everytime you use the override the fs height is 19 px lower. I couldn't figure out why.

Condor
15 Mar 2009, 11:51 PM
Can you post a testcase?

I tried this, but the editor remains the same size:

Ext.override(Ext.Editor, {
doAutoSize : function(){
if(this.autoSize){
var sz = this.boundEl.getSize(), fs = this.field.getSize();
switch(this.autoSize){
case "width":
this.setSize(sz.width, fs.height);
break;
case "height":
this.setSize(fs.width, sz.height);
break;
case "none":
this.setSize(fs.width, fs.height);
break;
default:
this.setSize(sz.width, sz.height);
}
}
}
});
Ext.onReady(function(){
new Ext.Viewport({
layout: 'fit',
items: {
xtype: 'editorgrid',
store: new Ext.data.SimpleStore({
fields: ['A', 'B', 'C'],
data: [
[1, 2, 3],
[2, 3, 4],
[3, 4, 5]
]
}),
columns: [
{dataIndex: 'A', header: 'A'},
{dataIndex: 'B', header: 'B'},
{dataIndex: 'C', header: 'C',
editor: new Ext.grid.GridEditor(new Ext.form.HtmlEditor({
width: 500,
height: 100
}),{
autoSize: 'none'
})
}
],
clicksToEdit: 1
}
});
});

kai5263499
26 Mar 2009, 4:39 AM
Have you found an answer to this issue yet? I am dealing with a similar problem.

Thanks,
-Wes

mystix
6 May 2009, 1:43 AM
[ yet another friendly bump ]
might as well nail this since the Ext.Editor's being fixed today. ;)

Condor
22 Jul 2009, 12:25 AM
Moved this thread from Ext 2.x to 3.x bugs.

It's still relevant (see recent post (http://extjs.com/forum/showthread.php?t=63170)).