PDA

View Full Version : Grid??TextArea????



tabara
8 Oct 2009, 6:48 AM
??????????????

?????????????????2???
?????????

?1???
?????????
http://www.extjs.com/deploy/dev/examples/grid/edit-grid.html
?????????????

??????TextArea??????????
height:100
????????TextArea???????????????????
??????textArea.jpg??
?????????????????

?2???
TextArea???????????????????????????
????????????????????????

?????????????????????????

yuki
9 Oct 2009, 12:12 AM
?1???
?????????
http://www.extjs.com/deploy/dev/examples/grid/edit-grid.html
?????????????

??????TextArea??????????
height:100
????????TextArea???????????????????
??????textArea.jpg??
?????????????????


?????????? (http://www.extjs.com/forum/showthread.php?t=44790)????????????Ext.Editor????????????????????????????????????????

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
}
});
});



?2???
TextArea???????????????????????????
????????????????????????

TextArea???????????<br />?????renderer????????????????????????????renderer??????????? (http://www.extjs.com/deploy/dev/examples/grid/array-grid.html)???????