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

会有一股神秘感。 提交于 2019-12-11 14:26:14

问题


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);

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.

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


回答1:


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?.



来源:https://stackoverflow.com/questions/47115108/how-to-access-the-id-of-a-collapsetool-in-a-grid

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!