Skip to main content
Bar

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

BarEditItem.EditValue Property

Gets or sets the in-place editor’s value.

Namespace: DevExpress.XtraBars

Assembly: DevExpress.XtraBars.v24.2.dll

NuGet Package: DevExpress.Win.Navigation

#Declaration

[Browsable(true)]
[DefaultValue(null)]
public virtual object EditValue { get; set; }

#Property Value

Type Default Description
Object null

An Object that specifies the editor’s value.

#Remarks

To respond to changing the EditValue property, handle the BarEditItem.EditValueChanged event.

For certain in-place editors, the static WindowsFormsSettings.InplaceEditorUpdateMode property controls the time when the BarEditItem.EditValueChanged event fires - immediately or after the in-place editor loses focus. See WindowsFormsSettings.InplaceEditorUpdateMode to learn more.

#Example

The following code shows how to:

  • embed a SpinEdit editor in a bar using the BarEditItem object.
  • assign an initial value to the editor (BarEditItem);
  • handle the BarEditItem.EditValueChanged event to perform actions when the editor’s value changes.

BarEditItem-EditValue-example.png

private void Form1_Load(object sender, EventArgs e) {
    // Create a BarEditItem with embedded SpinEdit in-place editor.
    BarEditItem item = new BarEditItem(barManager1);
    item.Edit = barManager1.RepositoryItems.Add("SpinEdit");
    bar1.AddItem(item);
    item.EditValueChanged += BarEditItem1_EditValueChanged;

    // Specify the editor's initial value.
    int initialValue = 0;
    item.EditValue = initialValue;
}

// Perform actions when the editor's value changes
private void BarEditItem1_EditValueChanged(object sender, EventArgs e) {
    BarEditItem item = sender as BarEditItem;
    object newValue = item.EditValue;
    //...
}

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