简体   繁体   English

如何在网格中访问折叠工具的ID?

[英]How to access the ID of a collapseTool in a grid?

I'm trying to access the ID of the collapseTool in a grid, but I'm not having any luck. 我正在尝试在网格中访问折叠工具的ID,但是我没有任何运气。 Here's a pic of my console when I simply console out the grid. 这是我简单地控制网格时控制台的照片。

console.log(grid);

在此处输入图片说明

and I would like to get the Id tool-1782 我想获得Id 工具1782

I've tried: 我试过了:

 console.log(grid.collapseTool) 

but it prints 但它打印

undefined 未定义

I'm working with an accordion that has grids inside of it, and I would like to get the id of each collapse button. 我正在使用内部具有网格的手风琴,我想获取每个折叠按钮的ID。

Example: 例:

 1) Id of first button: tool-1782
 2) Id of second button: tool-1783
 3) Id of third button: tool-1784
 4) Id of fourth button: tool-1785
 ......
 ....

Here's a picture of my accordion. 这是我的手风琴的照片。

在此处输入图片说明

Does anyone know how to access the id of collapseTool in a grid? 有谁知道如何在网格中访问crashTool的ID? Thank you in advance! 先感谢您!

I have used same console.log(grid.collapseTool.getId()) it is working fine. 我使用了相同的console.log(grid.collapseTool.getId())它工作正常。

You check here on my sencha fiddle demo. 您可以在我的煎小提琴演示中查看。

Here, Also you can check how-to-have-reference-to-an-accordin-in-extjs? 在这里,您还可以检查如何在extjs中引用一个Accordin? .

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM