EDIT: Replied to this old thread but I am using Ext 6.0.1
I have a locked grid where only one column can be on the locked side. For that scenario, I added a resize listener on the locked grid to resize the single column. I also set resizable to true on the locked grid and resizable to false on the locked column.
The same approach could be taken with more columns and a little math but it gets more complex because you have to allow resize on the columns themselves. I wonder if anyone else 'solved' this for the scenario where a locked side of a grid has 5 columns where only 3 show by default.
As mentioned above, it seems like if you resize columns with state management turned on and then refresh the browser, the locked grid may become the width of the columns as you expected. I tried to add a grid view refresh on the column resize listeners, but that didn't seem to work either. Perhaps just setting the width of the locked grid (but how to do that, brb ).
Here is sample code for a locked grid with only one locked column that should sync the width of the locked grid and the locked column.
Code:
lockedGridConfig : { width : 250,
resizable : true,
listeners : {
resize : function(grid, width, height, oldWidth, oldHeight) {
me.down('#mySingleLockedColumn').setWidth(width - 1);
}
}
Code:
columns : [{
text : 'Factor',
itemId : 'mySingleLockedColumn',
locked : true,
width : 350,
resizable : false,
hideable : false,
dataIndex : 'factor'
}.....]