Extjs取得某个控件并赋值

来源:互联网 发布:mdms-vb香蕉筛工作原理 编辑:程序博客网 时间:2024/05/22 16:44

在开发的很多时候,在调用另一个弹出页面或修改完一个内容后,需及时地反应出来,就这需要在修改后及时的给原有的框框赋值...
实际操作也是很简单,如:

Ext.getCmp('listname').setValue(updateitemname);

通过ID取得某个控件:

1.alertProductManagerWin.queryById(id).setValue(value),

其中alertProductManagerWin为定义的panel

2.Ext.getCmp(id).setValue(value);

通过名字取得某个控件

1.panelName.getForm().findField(name).setValue(value);


获取form里面的field的三种方法

1)Ext.getCmp('id');

2)FormPanel.getForm().findField('id/name');

3)Ext.get('id/name');//前提是FormPanel在界面上显示出来了

 

获得某个panel下的某个id的控件

panel.down('#id')