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.

Horizontal/Vertical scroll in grid

Thread ID:





72104 Mar 3,2008 03:57 AM Mar 5,2008 11:18 PM Windows Forms 1
Tags: GridControl
Asked On March 3, 2008 03:57 AM


How can I check if a GridControl has a scrollbar? Can I check this on the fly, even when I scale my application (so the GridControl is scaled too)? Thanks!


Administrator [Syncfusion]
Replied On March 5, 2008 11:18 PM

Hi Tim.,

If your intention is to fill the grid without showing a scrollbar and scale the application (GridControl too without the scrollbar), it can be achieved by using GridQueryColWidth.
The following code snippet shows how you can use GridQueryColWidth so that the grid is fill without showing the scrollbar.

protected virtual void GridQueryColWidth(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;

Please refer the following forum link that discuss about the grid without the scrollbar.



Please let me know if this is not what you needed.



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.