RepositoryItemTextEdit.ValidateOnEnterKey Property

Gets or sets whether to invoke the RepositoryItem.Validating event when pressing the ENTER key.

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraEditors.v21.1.dll


public virtual bool ValidateOnEnterKey { get; set; }

Property Value

Type Default Description


true if the RepositoryItem.Validating event is raised when the ENTER key is pressed; otherwise, false.


If the property value is false, validation occurs only when moving focus to another control. Set the editor’s CausesValidation property to true to allow validation (and raise the RepositoryItem.Validating event).

The RepositoryItem.Validating event can be handled if you need to provide a custom constraint for the edit value. For instance, you can check whether the text entered only contains appropriate characters or that a numeric value falls within a particular range etc. The event handler can keep focus within the editor and also lets you display an explanatory message about the error.

See Also