I am attempting to set the widths of each column. I have 3 visible columns. The center column is hard coded at (gridname.DisplayLayout..Bands(0).Columns("ColumnName").Width= 44). The other 2 columns will be calculated based on the remainder of the grid width. However, the GRIDCONTROLAREA is visible so I need to subtract that from my total.
My question is, how to get the width of the GRIDCONTROLAREA? On that note I will need the width of the vertical scroll bar also, just in case it is visible?
Thanks
If you want the columns to fill the available width of the grid, then you don't need to calculate it. Just set the AutoFitStyle property.
What you would do in this case is set the Width, MinWidth, and MaxWidth of the middle column to 44, so it's locked at a fixed size. Then set AutoFitStyle and the rest of the columns will be adjusted to fit the width of the grid.