AD
Administrator
Syncfusion Team
August 8, 2005 08:35 AM UTC
If the horizontal scrollbar is visible, you can avoid the gap on the right by setting:
this.grid.HScrollPixel = true;
If you have fewer columns than will occupy the grid''s client area (so the scrollbar is not visible), you can handle an event and make the right most column fill up the client aree;
//the event
this.grid.Model.QueryColWidth += new GridRowColSizeEventHandler(Model_QueryColWidth);
//the handler
private void Model_QueryColWidth(object sender, GridRowColSizeEventArgs e)
{
if (this.fillLastColumn && e.Index == Grid.ColCount)
{
int width = Grid.ColCount <= 0 ? 0 : Grid.ColWidths.GetTotal(0, Grid.ColCount-1);
e.Size = Grid.ClientRectangle.Width-width;
e.Handled = true;
}
}