CellControl Class |
Namespace: Stingray.Grid
The CellControl type exposes the following members.
Name | Description | |
---|---|---|
OnCanceledEditing |
Raises the CanceledEditing event.
| |
OnCancelEditing |
Raises the CancelEditing event.
| |
OnDraw |
Raises the DrawCellControl event.
| |
OnEndEditing |
Raises the EndEditing event.
| |
OnHide |
Raises the HideCurrentCell event.
| |
OnInit |
Raises the InitCurrentCell event.
| |
OnLeftCell |
Raises the LeftCell event.
| |
OnModifyCell |
Raises the ModifyCell event.
| |
OnRefresh |
Raises the RefreshCurrentCell event
| |
OnReset |
Raises the ResetCurrentCell event.
| |
OnStartEditing |
Raises the StartEditing event.
| |
OnStore |
Raises the StoreCurrentCell event.
| |
OnValidate |
Raises the ValidateCell event.
|
Name | Description | |
---|---|---|
DrawInactiveCell |
Gets or sets a value indicating if you want the grid to draw
inactive cell contents.
| |
Grid |
Gets the GridControl with which this custom control
is associated.
| |
ProcessEnterKey |
Gets or sets a value indicating if your custom control
processes enter key events.
| |
ProcessHorizontalArrows |
Gets or sets a value indicating if your custom control
processes horizontal arrow key events.
| |
ProcessVerticalArrows |
Gets or sets a value indicating if your custom control
processes vertical arrow key events.
| |
UseCellStyle |
Gets or sets a value that indicates whether the cell style
from the grid should be applied to the custom control.
|
Name | Description | |
---|---|---|
CanceledEditing |
Canceled Editing event.
| |
CancelEditing |
Cancel Editing event.
| |
DrawCellControl |
Draw Cell Control event.
| |
EndEditing |
End Editing event.
| |
HideCurrentCell |
Hide Current Cell event.
| |
InitCurrentCell |
Initialize Current Cell event.
| |
LeftCell |
Left Cell event.
| |
ModifyCell |
Modify Cell event.
| |
RefreshCurrentCell |
Refresh Current Cell event.
| |
ResetCurrentCell |
Reset Current Cell event.
| |
StartEditing |
Start Editing event.
| |
StoreCurrentCell |
Store Current Cell event.
| |
ValidateCell |
Validate Cell event.
|
You can configure instances of this class using the properties associated with the class. You can monitor or customize the behavior of the controls when grid events occur by attaching delegates to the many events exposed by the class.
After you configure the CellControl instance, it can be used in grid cells by creating or obtaining a style object, setting the CustomControl property to the desired CellControl, and then applying the style to the grid.
Note |
---|
Stingray Grid .NET currently supports the registration of up to 32 .NET cell controls. |
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 becomes 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 Text property upon initialization. For more advanced behavior, attach delegates to the InitCurrentCell and StoreCurrentCell events.
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 currently supported.