About a year ago I reported a bug where the grid would not size columns properly. I will repeat it here to and see if anyone has a workaround.
When the Grid displays, the last column's Fixed width (column 5) is ignored and it is extended to fill up the grid area. This is a bug IMHO. The grid is ignoring my request to Fix the Width of columns. The grid should extend the last column that is Sizable, not Fixed.
If I set up the grid to:
then ALL columns (including the Fixed Width columns) are resized as needed to fill the grid area. This becomes very pronounced when the application is maximized and the grid area increases. This is a bug IMHO. Again the grid is not honoring my request to Fix column Widths.
**********
The only thing I can think of, and this is not optimal, is that I will set the grid to AutoFitStyle.None and resize the columns on a size event. This is something the grid should be doing and not me. Anyone have any ideas on how to get around this bug? Can I "Lock" a column in place?
I don't know if this will work, but yuo might try also setting the Lock, MinWidth, and MaxWidth properties on the columns you want tohave fixed widths.
If any of those work, then I would agree that this is a bug, since the grid is obviously accounting for columns with fixed width, it's just not accounting for them the way you are doing it.
If none of those work, then it seems like the AutoFitStyle ignores other property settings and always sizes the last column, which makes sense, since that's what the enum value says - ResizeLastColumn. However, I can see your point, and there probably should be a way to specify which column to resize, rather than always making it the last column. If that's the case, you should Submit a feature request to Infragistics
I take it back, this is 1/2 a work-around. Sizing the grid works great with the solution above but when the User Sizes the Columns, the Fixed columns will _also_ automagically resize.
I found a work-around.
This tells the sizing algorithm to pretty much give all the available size to the highest weighted columns.
I still consider this a work-around and consider the grid to have a bug.