Ron
Ron

Reputation: 563

On extjs 5, how to disable an action column item?

At first, one have to get it, I can only get the GRIDPANEL, and cannot get action column.

I find #grid >#itemid is null, but #grid is good.

could anyone help me about this?

Upvotes: 0

Views: 2197

Answers (1)

Alexander
Alexander

Reputation: 20224

        columns: [{
            xtype: 'actioncolumn',
            items: [{
                isDisabled: me.fnIsDisabled,
                ...



...
fnIsDisabled: function(grid, rowIndex, colIndex, items , rec){
    return rec.get('global');
},

will disable the action in all rows where the corresponding record has property global set to true.

You won't have to fiddle with the column itself at all...

Upvotes: 1

Related Questions