Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to obtain a reference to a Checkbox in a toolbar?

Tags:

extjs

Could someone tell me the preferred way of getting a reference to checkbox if its in a toolbar in an EditorGridPanel? I simply would like to call the getValue() on it so I can do stuff with it.

My EditorGridPanel is built similar to the one below (plus a few more config properties):

var grid = new Ext.grid.EditorGridPanel({    
tbar: new Ext.Toolbar({
            width: 200,
            height: 30,
            items: [
                {
                    xtype: 'checkbox',
                    name: 'field1',
                    boxLabel: 'Order aktiverad'
                }
            ]
        })
 });

Thanks!

like image 617
Aicos Avatar asked Dec 30 '25 19:12

Aicos


1 Answers

Can't you just give the checkbox an itemId, and use getCmp()?

like image 95
timdev Avatar answered Jan 07 '26 08:01

timdev



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!