PDA

View Full Version : acces to button in Grid's tbar



masoud_tamizy
20 Feb 2012, 11:47 AM
i have a button in my grid's tbar and my grid is located in a border layout container .
i accessed to grid with this :
Ext.getCmp('east-region');
but i couldn't access to tbar's button .
how can i access to this button ?
i tested this :
var g=east.down('#add');
but it return null !!!

sskow200
20 Feb 2012, 1:34 PM
why not Ext.get('#add')??? provided your application isn't complex? Otherwise you can access the grid tbar and search from there...



var grid = Ext.get('east-region').down('gridpanel');
console.log(grid.tbar);