Automatic column sizing/fitting

There only seems to be one working option for auto-fitting AdvWebGrid columns... setting the columns to percent mode, setting the right anchor and then using UseFullWidth... the manual barely mentions this and implies that you should just use wtAbsolute... 

We really want to be able to have the grid resize with the browser width and the columns with it.  The wtPercent works for that but for some columns we would like to have an absolute width with the rest of the columns resize to fit.  For example, a date column where we know the data will always be formatted to a certain with does not need to resize but a name column should resize for wider display selections so you can see more data.

I can't seem to get the 'StretchColumn' field to have any effect.  I assume this is when using absolute column widths so you can pick one column to stretch?

perhaps the various options could be documented or explained here?


You are correct, you can use the StretchColumn property to set the index of the Column that needs to be stretched.

With UseFullWidth set to true and the WidthType of your Columns set to wtAbsolute.

If you still can't get the StretchColumn to work, please provide a ready to use sample project by email that demonstrates the issue so I can further investigate this.