Back to Devexpress

RepositoryItem.EditValueChanging Event

windowsforms-devexpress-dot-xtraeditors-dot-repository-dot-repositoryitem-09e90ac0.md

latest3.6 KB
Original Source

RepositoryItem.EditValueChanging Event

Fires when the editor’s value is about to be changed.

Namespace : DevExpress.XtraEditors.Repository

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[DXCategory("Events")]
public event ChangingEventHandler EditValueChanging
vb
<DXCategory("Events")>
Public Event EditValueChanging As ChangingEventHandler

Event Data

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

PropertyDescription
CancelGets or sets a value indicating whether the event should be canceled. Inherited from CancelEventArgs.
IsBoundUpdatingEditValueFor internal use.
IsTextChangingFor internal use.
ModifiedByUserGets whether a user changed the value.
NewValueGets or sets the value which is about to be assigned to the editor. Setting the NewValue property is not supported if the editor uses masked input (RepositoryItemTextEdit.MaskSettings).
OldValueGets the editor’s value.

Remarks

The EditValueChanging event is raised when the edit value (BaseEdit.EditValue) is about to be changed (in code or by a user). The potential new value can be identified by the ChangingEventArgs.NewValue parameter. The current edit value is identified by the ChangingEventArgs.OldValue parameter. To cancel the modification, set the Cancel parameter to true.

Note

Do not display modal dialogs or move focus within the EditValueChanging event, as this can lead to the loss of the current value.

See Also

EditValue

EditValueChanged

EnableCustomMaskTextInput(Action<CustomTextMaskInputArgs>, Object)

RepositoryItem Class

RepositoryItem Members

DevExpress.XtraEditors.Repository Namespace