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.

Loader.
Up arrow icon