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.
Unfortunately, activation email could not send to your email. Please try again.

Extend last column

Thread ID:

Created:

Updated:

Platform:

Replies:

32752 Aug 8,2005 02:34 AM Aug 8,2005 04:35 AM Windows Forms 1
loading
Tags: GridControl
Rene Balvert
Asked On August 8, 2005 02:34 AM

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 04:35 AM

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

CONFIRMATION

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.

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.

;