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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Extend last column

Thread ID:





32752 Aug 8,2005 06:34 AM UTC Aug 8,2005 08:35 AM UTC WinForms 1
Tags: GridControl
Rene Balvert
Asked On August 8, 2005 06:34 AM UTC

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

Administrator [Syncfusion]
Replied On 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; } }


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon