Back to Devexpress

CardViewSettings.CellEditorInitialize Property

aspnetmvc-devexpress-dot-web-dot-mvc-dot-cardviewsettings-610b6fbb.md

latest2.7 KB
Original Source

CardViewSettings.CellEditorInitialize Property

Enables initializing the cell editors displayed within the CardView edit cells.

Namespace : DevExpress.Web.Mvc

Assembly : DevExpress.Web.Mvc5.v25.2.dll

NuGet Package : DevExpress.Web.Mvc5

Declaration

csharp
public ASPxCardViewEditorEventHandler CellEditorInitialize { get; set; }
vb
Public Property CellEditorInitialize As ASPxCardViewEditorEventHandler

Property Value

TypeDescription
ASPxCardViewEditorEventHandler

An ASPxCardViewEditorEventHandler delegate method allowing you to implement custom processing.

|

Remarks

The CellEditorInitialize event is raised when the CardView 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).

  • This example demonstrates how to prevent an end-user from changing the unit price. To do this, the CellEditorInitialize event is handled. If the processed edit cell corresponds to a column bound to the ‘UnitPrice’ data field, its editor’s ReadOnly property is set to true.

See Also

Declaring Server-Side Event Handlers

Card View

CardViewSettings Class

CardViewSettings Members

DevExpress.Web.Mvc Namespace