extjs gridpanel 中添加form控件

extjs gridpanel 中添加form控件,第1张

你是要在Ext.grid.GridPanel里面嵌入Form吧

1 var grid = new Ext.grid.GridPanel([{

2 cm: new Ext.grid.ColumnModel({

3 header: '',

4 dataIndex: '',

5 //设置列显示值

6 //v:当前列的值

7 //params:当前列的参数

8 //record:当前记录集

9 renderer: function(v, params, record){}

10 }]),

11 form: new Ext.form.FormPanel({

12 }

13 })

14 })

Ext.create('Ext.form.Panel', {

title: 'Simple Form with FieldSets',

labelWidth: 75, // label settings here cascade unless overridden

url: 'save-form.php',

frame: true,

bodyStyle: 'padding:5px 5px 0',

width: 550,

renderTo: Ext.getBody(),

layout: 'column', // arrange fieldsets side by side

defaults: {

bodyPadding: 4

},

items: [{

// Fieldset in Column 1 - collapsible via toggle button

xtype:'fieldset',

columnWidth: 0.5,

title: 'Fieldset 1',

collapsible: true,

defaultType: 'textfield',

defaults: {anchor: '100%'},

layout: 'anchor',

items :[{

fieldLabel: 'Field 1',

name: 'field1'

}, {

fieldLabel: 'Field 2',

name: 'field2'

}]

}, {

// Fieldset in Column 2 - collapsible via checkbox, collapsed by default, contains a panel

xtype:'fieldset',

title: 'Show Panel', // title or checkboxToggle creates fieldset header

columnWidth: 0.5,

checkboxToggle: true,

collapsed: true, // fieldset initially collapsed

layout:'anchor',

items :[{

xtype: 'panel',

anchor: '100%',

title: 'Panel inside a fieldset',

frame: true,

height: 52

}]

}]

})


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/bake/11437684.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-16
下一篇 2023-05-16

发表评论

登录后才能评论

评论列表(0条)

保存