BarEditItem.EditValue Property
Gets or sets the in-place editor’s value.
Namespace: DevExpress.XtraBars
Assembly: DevExpress.XtraBars.v24.1.dll
NuGet Package: DevExpress.Win.Navigation
Declaration
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.
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;
//...
}
Related GitHub Examples
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.