We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Extend last column

Hi, Is there an option to extend the last row to the right border of the grid (also when the hor. scrollbar appears)? Rene

1 Reply

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; } }

Loader.
Live Chat Icon For mobile
Up arrow icon