How to access the ID of a collapseTool in a grid?

2019-08-22 09:24发布

I'm trying to access the ID of the collapseTool in a grid, but I'm not having any luck. Here's a pic of my console when I simply console out the grid.

console.log(grid);

enter image description here

and I would like to get the Id tool-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.

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.

enter image description here

Does anyone know how to access the id of collapseTool in a grid? Thank you in advance!

1条回答
Evening l夕情丶
2楼-- · 2019-08-22 09:56

I have used same console.log(grid.collapseTool.getId()) it is working fine.

You check here on my sencha fiddle demo.

Here, Also you can check how-to-have-reference-to-an-accordin-in-extjs?.

查看更多
登录 后发表回答