This sample illustrates the automatic resizing of grid cells depending on the size of custom controls placed inside cells.
Features
Essential Grid lets you add custom controls in grid cells by creating a CellModel class and a CellRenderer class.
Custom controls can have different sizes, and when many of these controls are placed in the grid, the corresponding cell is adjusted to display the controls properly. This adjustment is achieved by overriding the method OnQueryPrefferedClientSize method in the model class, which returns the proper size of the control.
ResizeToFit method uses the OnQueryPrefferedClientSize method to get the correct size of custom control.
This sample is built with two user controls and one custom cell type.
CellModel and CellRenderer classes are implemented to incorporate these custom controls in grid cells.