Click or drag to resize
CellControlOnInit Method
Raises the InitCurrentCell event.

Namespace: Stingray.Grid
Assembly: Stingray.GridControl (in Stingray.GridControl.dll) Version: 14.0.0.0
Syntax
protected virtual void OnInit(
	InitCurrentCellEventArgs e
)

Parameters

e
Type: Stingray.GridInitCurrentCellEventArgs
The event data.
Remarks
This method is invoked by GridControl when the intrinsic state (for example, the row and column style) of the control for the current cell needs to be initialized. It is invoked when the current cell moves and this CellControl is being initialized as the new current cell. The event arguments name the row and column coordinates of the new current cell.

The following steps show the normal processing of this event:

  • The InitCurrentCell event is invoked.
  • The row and column properties for the cell are set.
  • The control top, left corner, and size are set to the size of the current grid cell.
  • If UseCellStyle is set, the grid cell styles for the current cell are used to set the font, forground color, and background color of the .NET control used in the cell.
  • The .NET control Text property is set to the Value property for the current cell.
  • The control is made visible.

Delegates can be attached to the InitCurrentCell event in order to give more sophisticated cell initialization. If special active current cell drawing is required, it should be performed when this event is invoked.
See Also