ExtJS获取父容器、子容器、兄弟容器的方法

比如操作按钮删除记录,就需要子按钮获得父容器id,然后进行删除

var  id   =  this.ownerCt.id;

Ext.getCmp('labelForm').remove(id);

 

1.当前对象的父对象(上级对象) 
this.ownerCt: 

2.当前对象的下一个相邻的对象 
this.nextSibling(); 

3.当前对象的上一个相邻的对象 
this.previousSibling(); 

4.当前容器中的第一个子对象 
this.get(0); 
this.items.first(); 

5.当前容器的最后一个子对象 
this.items.last(); 

6.查找当前对象的所有上级匹配的容器 
this.findParentByType(String xtype) 

7.查找当前对象的所有下级匹配的组件 

this.findByType(String xtype)

 

 

 

相关文章:

  • 2022-12-23
  • 2021-10-23
  • 2022-12-23
  • 2021-07-13
  • 2021-06-06
  • 2022-12-23
  • 2022-03-04
  • 2022-01-15
猜你喜欢
  • 2021-10-09
  • 2022-01-20
  • 2021-07-30
  • 2021-11-13
  • 2021-07-19
  • 2022-12-23
相关资源
相似解决方案