[]
        
(Showing Draft Content)

C1.Win.C1FlexGrid.C1FlexGridBase.SetupEditor

SetupEditor Event

Fires after a cell editor has been initialized by the grid, to allow additional custom initialization.

Namespace: C1.Win.C1FlexGrid
Assembly: C1.Win.C1FlexGrid.4.8.dll
Syntax
public event RowColEventHandler SetupEditor
Returns
Type Description
RowColEventHandler Fires after a cell editor has been initialized by the grid, to allow additional custom initialization.
Remarks

This event can be used to customize the behavior of the cell editor by setting properties on the editor control.

For example, the code below checks to see if the editor being used is a TextBox, and then sets the editor's CharacterCasing and MaxLength properties.

void _flex_SetupEditor(object sender, RowColEventArgs e)
{
    TextBox tb = _flex.Editor as TextBox;
    if (tb != null)
    {
        if (_flex.Cols[e.Col].Name == "ID")
            tb.MaxLength = 4;
        else
            tb.MaxLength = 32000;
    }
}