In my grid, I have a variety of columns, and I use PerformAutoResize to size them down. The 'Name' column that I have is not the last column, so ExtendLastColumn won't do what I want, which is to shrink all columns except Name down and then extend out the Name column with all the remaining room.
What's the best way to do this?
Thanks,
J
Hi J,
Try something like this:
private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e) { foreach (UltraGridColumn column in e.Layout.Bands[0].Columns) { column.PerformAutoResize(PerformAutoSizeType.AllRowsInBand); if (column.Key != "Name") { column.MinWidth = column.Width; column.MaxWidth = column.Width; } } e.Layout.AutoFitStyle = AutoFitStyle.ResizeAllColumns; }
Just what I was looking for, thanks Mike!