How to check mark a check column in a grid?

181 views Asked by At

I have a check column on a grid that I need to programatically check mark.

Here is how the check column is scripted:

columns: {
    items:[
        {
            itemId: 'checkColumn',
            xtype: 'selectallcheckcolumn',
            cls: 'select-all-check-column',
            dataIndex: 'Checked',
            hideable: false
        },
1

There are 1 answers

0
NewKidOnTheBlock On BEST ANSWER
var grid = Ext.ComponentQuery.query('grid[itemId=gridID]')[0];
var view = grid.getView();
var record = view.getRecord({0});
var active = record.get('active');
record.set('active', !active);