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

Accounting for the scroll bar width

Thread ID:





16284 Jul 11,2004 12:37 AM UTC Jul 11,2004 05:43 AM UTC WinForms 1
Tags: GridControl
Administrator [Syncfusion]
Asked On July 11, 2004 12:37 AM UTC

When I am calculating the width a column needs to be in a Syncfusion.Windows.Forms.Grid.GridControl, I am using the width of the GridControl / NumberOfColumns I want. The problem is that depending on the number of rows, I may or may not have a scroll bar, and if I do have a scroll bar I need to know how to get its width so that I can take it in to consideration i.e ColWidth = (GridWidth - ScrollBarWidth) / NoOfColumns Can anyone tell me how to get a GridControls scrollbar width please?

Administrator [Syncfusion]
Replied On July 11, 2004 05:43 AM UTC

Try using this.gridControl1.ClientSize.Width to get your ''GridWidth''. This property should give you the proper width whether or not there is a scrollbar present.


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

This page will automatically be redirected to the 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

Live Chat Icon For mobile
Live Chat Icon