gpt4 book ai didi

javascript - 在 FormPanel 中获取子 editorGrid 类型

转载 作者:行者123 更新时间:2023-11-28 02:59:02 35 4
gpt4 key购买 nike

在我的 extjs FormPanel 中,我有几个编辑器网格。我不知道这些网格的ID是什么,所以我无法使用Ext.getCmp

“获取此 FormPanel 中的所有 editorgrid 类型”的最佳表达方式是什么?

最佳答案

您可以使用 isXType 按每个项目的类型过滤 FormPanel 的 items 集合:

var grids = formPanel.items.filterBy(function (item) {
return item.isXType("editorgrid");
});

grids 将是所有 EditorGridPanel 项的新集合。

更新:更简洁的方式:

var grids = formPanel.findByType("editorgrid", true);

关于javascript - 在 FormPanel 中获取子 editorGrid 类型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1717937/

35 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com