GridControlRegisterControl Method (Control) |
Namespace: Stingray.Grid
When a .NET control is used as a grid cell editor, only one instance of the control is held, even when the control is used with a range of cells. When a grid cell that contains the custom control is made the current cell, the control is initialized with the cell contents for the current cell, and is made visible in the current cell.
By default, the stored grid value (Value) is used to initialize the control's Text property upon initialization. For more advanced behavior, attach delegates to the InitCurrentCell event of the CellControl.
Some .NET controls, such as NumericUpDown controls and single-line edit controls, do not size themselves exactly as instructed. In these cases, the .NET cell controls may not completely fill a grid cell. These controls may also consume a larger screen area than the size of the cell in which they are embedded.
Currently, delegates must be used to customize the behavior of .NET controls. Derivation from CellControl is not supported.