Hi Mike,
You can handle the QueryColWidth event of the TableModel as follows and also set SmoothControlResize = false.
this.gridGroupingControl1.TableModel.QueryColWidth += new GridRowColSizeEventHandler(TableModel_QueryColWidth);
this.gridGroupingControl1.TableModel.Options.SmoothControlResize = false;
bool fillLastColumn = true;
private void TableModel_QueryColWidth(object sender, GridRowColSizeEventArgs e)
{
GridTableModel gridModel = sender as GridTableModel;
GridTableControl grid = (GridTableControl) gridModel.ActiveGridView;
if (gridModel != null && grid != null)
{
int lastColIndex = gridModel.ColCount-2; // GridTableModel always has one two empty extra column at end
if (this.fillLastColumn && e.Index == lastColIndex)
{
int width = gridModel.ColCount <= 0 ? 0 : gridModel.ColWidths.GetTotal(0, lastColIndex-1);
e.Size = grid.ClientRectangle.Width-width;
e.Handled = true;
}
}
}
I attached a sample project.
AutoFillLastColumn_5112.zip
Stefan