Back to Devexpress

ASPxVerticalGrid.CellEditorInitialize Event

aspnet-devexpress-dot-web-dot-aspxverticalgrid-fb82d3b9.md

latest3.0 KB
Original Source

ASPxVerticalGrid.CellEditorInitialize Event

Enables initializing the cell editors displayed within the edit cells.

Namespace : DevExpress.Web

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
public event ASPxVerticalGridEditorEventHandler CellEditorInitialize
vb
Public Event CellEditorInitialize As ASPxVerticalGridEditorEventHandler

Event Data

The CellEditorInitialize event's data class is ASPxVerticalGridEditorEventArgs. The following properties provide information specific to this event:

PropertyDescription
EditorGets the editor currently being processed. Inherited from ASPxGridEditorEventArgs.
RowGets the data row whose cell editor is being initialized.
ValueGets the editor’s value. Inherited from ASPxGridEditorEventArgs.

Remarks

The CellEditorInitialize event is raised when the ASPxVerticalGrid is switched to edit mode and enables you to initialize cell editors.

Note

  • Since the CellEditorInitialize event works correctly only when a request is sent to the server to initialize an editor, this event will not be raised after you start editing a new row in Batch edit mode because in this mode, requests are not sent to the server when an editor is activated.
  • The CellEditorInitialize event affects only the edit mode settings (when editors are visible).
  • The CellEditorInitialize event isn’t raised for edit cells that contain custom editors defined using templates.
  • The CellEditorInitialize event fires only for built-in column editors.

Examples

The following example illustrates how to use the CellEditorInitialize event to automatically focus the required column’s editor using the editor’s ASPxWebControl.Focus method (the e.Editor event argument).

csharp
protected void ASPxVerticalGrid1_CellEditorInitialize(object sender,
    DevExpress.Web.ASPxVerticalGridEditorEventArgs e) {
    if (e.Column.FieldName == "TimeFrom") {
        e.Editor.Focus();
    }
};

See Also

Vertical Grid

ASPxVerticalGrid Class

ASPxVerticalGrid Members

DevExpress.Web Namespace