ext动态添加行。急。。
如题, 假如我这里有一行数据需要填写,后面有一个添加的按钮,当我每次点击添加按钮的时候,就在下面自动增加一行出来,我用的FormPanel,
var form = new Ext.form.FormPanel({
collapsible: true,
resizable:false,
frame:true,
labelWidth: 100,
baseCls:'x-panel-noborder',
buttonAlign:'center',
items: [{
layout: 'column',
height: 40,
baseCls: 'background-color:#FFFFFF',
items: [{
xtype: 'label',
columnWidth: .10,
html: '移动通道:',
cls: 'label1'
}, {
xtype:'combo',
id:'ydChannl',
name:'ydChannl',
allowBlank:false,
store : yddyncStore,
emptyText : "请选择",
isFormField : true,
mode : "remote",
triggerAction : "all",
valueField : "value",
displayField : "text",
editable : false,
columnWidth: .30
},{
xtype: 'label',
columnWidth: .20,
html: '通道分配比例:',
cls: 'label1'
},{
xtype: 'combo',
id: 'ydlevel',
name: 'ydlevel',
displayField: 'text',
valueField: 'value',
editable: false,
store: new Ext.data.SimpleStore({
fields: ['value', 'text'],
data: [[0, '0.1'], [1, '0.2']]
}),
triggerAction: 'all',
readOnly: true,
mode: 'local',
value: '1',
columnWidth: .20
},{
xtype: 'button',
columnWidth: .10,
text: '添加',
handler : function() {
}
}]
}]
)}
这就是我的第一行,当我点添加的时候,怎么在添加的function里面写代码,自动在下面添加一行呢?有高手帮帮忙。。谢谢了。
var form = new Ext.form.FormPanel({
collapsible: true,
resizable:false,
frame:true,
labelWidth: 100,
baseCls:'x-panel-noborder',
buttonAlign:'center',
items: [{
layout: 'column',
height: 40,
baseCls: 'background-color:#FFFFFF',
items: [{
xtype: 'label',
columnWidth: .10,
html: '移动通道:',
cls: 'label1'
}, {
xtype:'combo',
id:'ydChannl',
name:'ydChannl',
allowBlank:false,
store : yddyncStore,
emptyText : "请选择",
isFormField : true,
mode : "remote",
triggerAction : "all",
valueField : "value",
displayField : "text",
editable : false,
columnWidth: .30
},{
xtype: 'label',
columnWidth: .20,
html: '通道分配比例:',
cls: 'label1'
},{
xtype: 'combo',
id: 'ydlevel',
name: 'ydlevel',
displayField: 'text',
valueField: 'value',
editable: false,
store: new Ext.data.SimpleStore({
fields: ['value', 'text'],
data: [[0, '0.1'], [1, '0.2']]
}),
triggerAction: 'all',
readOnly: true,
mode: 'local',
value: '1',
columnWidth: .20
},{
xtype: 'button',
columnWidth: .10,
text: '添加',
handler : function() {
}
}]
}]
)}
这就是我的第一行,当我点添加的时候,怎么在添加的function里面写代码,自动在下面添加一行呢?有高手帮帮忙。。谢谢了。
...全文
相关推荐
Ext grid 动态添加字段、列扩展
Ext grid 动态添加字段、列扩展, 如何动态添加或者删除一个grid的列
[Ext JS 4] 实战之Grid, Tree Gird 动态添加行
在 [Ext JS 4] 实战之Grid, Tree Gird 动态添加列 这一篇中,有介绍到如何动态添加一列 -- 设置新columns 后调用reconfigure 方法。 这里来承接这一篇, 说说如何添加一列? 看上去很简单, 因为reconfigure方法可以传入两个参数,columns 和 store , 看上去设置新的store 后, 调用reconfigure就可以了。 一般的Grid 可以, 但是如果是Tree Grid 的话, 就会抛出异常。
自动添加行(ext)
大家看看吧,咱们这个不要分,看看看看看看看看看看看看看看看看啊看你!
ext grid 合并行
本人成功实现的一个合并列的例子,希望对大家有帮助
Ext.net实现GridPanel拖动行、上移下移排序功能DEMO
对于GridPanel中拖动选中行排序的实现,网上有不少ExtJs实现的例子,但是没有找到使用Ext.net实现的,正好最近有个需求要使用,干脆来写一个。 DEMO功能说明: 1、拖动GridPanel选中行到新位置排序。 2、在拖动结束后,重新会选中前面拖动的行。 3、拖动排序功能支持Grid单选与多选模式。 4、加了【最上】【最下】【上移】【下移】四个按钮排序的功能。目前按钮排序只能在Grid的单选模式下使用。 实现说明与功能演示请见我的Blog


