extjsextjs5extjs-grid

How to Flex column width in an extjs locking grid


How can i flex the width of columns in a extjs locking grid ?

If the set the flex config on columns, extjs throws an error saying locking grid columns can not specify flex values. The grid panel has layout:'fit' config set.


Solution

  • Looks like atleast in ExtJs 5.1.1 you just need to specify the lockedGrid's own flex:

    xtype: 'gridpanel',
    enableLocking: true,
    layout: 'border',
    split: true,
    lockedGridConfig: {
        emptyText: '',
        collapsible: false,
        //forceFit: true,//<-this doesn't work
        flex: 1/4
    },