3
votes

I need a action column to be locked in postion and size. Therefore I thought is the locked property but as soon as I add it I get the

[E] Layout run failed

error for each row to render. What do I wrong or is this a bug?

I am using ExtJS 4.2.1

{
    layout: 'hbox',
    border: false,
    xtype: 'container',
    items: [
        {
            xtype: 'grid',
            shrinkWrapDock: true,
            flex: 1,
            store: store,
            minHeight: 300,
            title: 'Test',
            columns: [
                { xtype:'actioncolumn', locked: true, sortable: false, hideable: false, dataIndex: 'Aktiv', width: 20, items: [{
                        tooltip: 'deactivate', 
                        handler: function(view,row,col,item,ev,rec,row) {
                            rec.data.set('Active',!rec.data.get('Active'));
                        } 
                    }]
                },
                // more columns
            ]
        }
    ]
}
1
can you show your codes ? - Raptor
@ShivanRaptor please see my edit - seba

1 Answers

1
votes

I am unsure why you are getting that error, but I don't think locked is what you are looking for.

If you are trying to prevent the user from changing the column width and from dragging the column into a new position, then try adding the following instead of locked:

draggable: false,
resizable: false

Edit:

You also mentioned you wanted to restrict the user from hiding the column. Do this by adding the following config to the two listed above:

hideable: false

And check out the documentation for more config options and information. http://docs.sencha.com/extjs/4.2.2/#!/api/Ext.grid.column.Column