Rollan,
Below is the code to expand the right column in the VirtTreeGrid sample. In implementing this expandable right column in this particular sample, there is a refresh problem as you size the grid larger. You can add a SizedChanged handler, and redraw the last column to handle this refresh problem.
-Clay (still working on Sat...)
void GridQueryColWidth(object sender, GridRowColSizeEventArgs e)
{
if( e.Index == 1)
e.Size = 200;
else if(e.Index == gridControl1.ColCount)//fill grid with last col
{
int width = gridControl1.ColWidths.GetTotal(0, gridControl1.ColCount-1);
e.Size = Math.Max(20, gridControl1.ClientRectangle.Width-width);
}
else if (e.Index > 0)
e.Size = 100;
else
e.Size = 0;//hide the header // 30;
e.Handled = true;
}
private void gridControl1_SizeChanged(object sender, System.EventArgs e)
{
gridControl1.RefreshRange(GridRangeInfo.Col(gridControl1.ColCount));
}