'宣言 Public Event SetupEditor As RowColEventHandler
public event RowColEventHandler SetupEditor
イベント データ
イベント ハンドラが、このイベントに関連するデータを含む、RowColEventArgs 型の引数を受け取りました。次の RowColEventArgs プロパティには、このイベントの固有の情報が記載されます。
| プロパティ | 解説 |
|---|---|
| Cancel | Gets or sets a value indicating whether the operation should be canceled. |
| Col | Gets the index of the column that caused the event. |
| Row | Gets the index of the row that caused the event. |
解説
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; } }参照