Skip to main content

BaseEdit.EditValue Property

Gets or sets the editor’s value.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v22.2.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);
}
See Also