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

Accounting for the scroll bar width

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?

1 Reply

AD Administrator Syncfusion Team 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.

Live Chat Icon For mobile
Up arrow icon