View Full Version : Grid Column Width Compressed to "Fit" (after ListLoader.load()).

12 Mar 2012, 2:20 PM
I followed the example code to create a grid with a horizontal scrollbar however, since I'm using a RPC call to get the data, the grid columns are all squashed together so that they "fit" inside the ContentPanel (see the code for 'Framed with Checkbox Selection and Horizontal Scrolling'; createCheckBox() method; in http://extjs.com/examples/#gridplugins).

As far as I can see that is the only difference between the example code and mine. The example creates the grid with the store already populated.

Any hints??


I know I didn't include a "working" example of my code... It's a lot of code and you wouldn't get the RPC call to work anyway...

12 Mar 2012, 2:28 PM
If I catch the ListLoader LoadEvent and then set the column width it works however that seems to be a bit sloppy. There is a delay between the time the grid is rendered and the data appears. I noticed that even then the columns are sized to 'fit'. It's seems like the FitLayout is overriding the column widths at render time (which kinda sound correct *sigh*).

27 Jun 2012, 7:21 AM
For enquiring minds: Less is More
I was setting too many properties for all the containers and layouts. Replaced many of the ContentPanels with LayoutContainers and only setting the layout = FitLayout.