I have:
1.) What should I type in this.control() for getting the reference to the grid panel?
My plan is, when user double clicks one row, new tab is created. I already have code for creating new tabs but I just need to get reference to the grid panel.
Something like this:
'viewport > westpanel > accordion > gridpanel': {
doubleclick: function...
}
2.) Let’s say that I gave an ID to the grid panel. How can I get reference in this.control using .get method?
3.) How can I be sure that I’ve got the right reference? Can I console.log() – it or something like that?
I would know how to do this without MVC but here I need help. 🙂
Thank you! 🙂
It is quite easy once you understand how to use it. First you should read the API about the ComponentQuery cause that is what is used within the control.
this depends on your components. You so can go by the xtype
'panel > grid': {itemdblclick:this.yourCallback}the recommend way if you can’t define a really unique path by xtypes
'#myID': {itemdblclick:this.yourCallback}using defined refs within the control is not possible in the currently release, as far as I know.Use Id’s instead of just xtypes
'#myID > grid': {itemdblclick:this.yourCallback}or define additional params'#myID > grid[customProp=identString]': {itemdblclick:this.yourCallback}