Home Forums WinForms controls Xceed Grid for WinForms GridControl sizing Reply To: GridControl sizing

User (Old forums)
Post count: 23064

There is no feature on the GridControl to do this.  You will have to do it yourself.  Though  you may find this inelegant, if we were to implement such a feature, it would be implemented this way, that is, get the height of all elements being displayed in the grid, and adjust the grid height to the result.

Basically, you need to get the height of each DataRow if you allow you use to modify the height of rows, or if you set the height to fit all content, else you could use the DataRowTemplate Height property.  You will also need to get the height of each row in the GridControl FixedHeaderRows/FixedFootersRows and HeaderRows/Footers.  Moreover, if you allow groups or detail grids, then you will have to take into account all of these, and verify for each instance of a group or detail if they are expanded or collapsed, and add the spacing for the DetailGrids.

Imported from legacy forums. Posted by André (had 835 views)