FlexGrid for WinForms
SetupEditor Event



Fires after a cell editor has been initialized by the grid, to allow additional custom initialization.
Syntax
'Declaration
 
<C1DescriptionAttribute("Fires after a cell editor has been initialized by the grid, to allow additional custom initialization.")>
Public Event SetupEditor As RowColEventHandler
'Usage
 
Dim instance As C1FlexGridBase
Dim handler As RowColEventHandler
 
AddHandler instance.SetupEditor, handler
[C1Description("Fires after a cell editor has been initialized by the grid, to allow additional custom initialization.")]
public event RowColEventHandler SetupEditor
[C1Description("Fires after a cell editor has been initialized by the grid, to allow additional custom initialization.")]
public:
event RowColEventHandler^ SetupEditor
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; } }
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

C1FlexGridBase Class
C1FlexGridBase Members

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Send Feedback