Skip to main content

BaseEdit.EditValue Property

Gets or sets the editor’s value.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v24.1.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

[Bindable(true)]
[DefaultValue(null)]
[DXCategory("Data")]
public virtual object EditValue { get; set; }

Property Value

Type Default Description
Object null

An object representing the editor’s value.

Remarks

Setting this property to a new value raises the RepositoryItem.EditValueChanging event. The RepositoryItem.EditValueChanged event fires after the EditValue property value has been changed.

Use the BaseEdit.Text property to obtain the editor’s text representation of this value.

Example

The following example binds a CalcEdit editor to the Freight field in a data source (OrdersBindingSource).

calcEdit1.DataBindings.Add(new System.Windows.Forms.Binding("EditValue", ordersBindingSource, "Freight", true));

Example

The following example uses the EditValue property to select the first lookup row in a LookUpEdit control.

LookUpEditor

private void btnSelectRow_Click(object sender, EventArgs e) {
    lookUpEdit1.EditValue = lookUpEdit1.Properties.GetDataSourceValue(lookUpEdit1.Properties.KeyMember, 0);
}

The following code snippets (auto-collected from DevExpress Examples) contain references to the EditValue property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also