'Declaration Public Event KeyPressEdit As KeyPressEditEventHandler
public event KeyPressEditEventHandler KeyPressEdit
The event handler receives an argument of type KeyPressEditEventArgs containing data related to this event. The following KeyPressEditEventArgs properties provide information specific to this event.
Property | Description |
---|---|
Col | Gets the column index of the cell being edited when the key was pressed. |
Handled | Gets or sets a value indicating whether the event was handled and should be ignored by the control. |
KeyChar | Gets the character corresponding to the key pressed. |
Row | Gets the row index of the cell being edited when the key was pressed. |
The C1.Win.C1FlexGrid.C1FlexGridBase.KeyPressEdit event corresponds to the System.Windows.Forms.Control.KeyPress event, except it fires when the grid is in edit mode (in this case, the control that receives the key is the editor, not the grid itself).
The editor has three modes: text, drop-down combo, or drop-down list. The mode used is determined by the C1.Win.C1FlexGrid.C1FlexGridBase.ComboList properties in the grid and column objects.
While editing with the text editor or with a drop-down combo, you may set or retrieve the contents of the editor by retrieving the editor control with the C1.Win.C1FlexGrid.C1FlexGridBase.Editor property and casting it to the proper type.