windowsforms-devexpress-dot-xtrabars-dot-baredititem-5a6ea70a.md
Gets or sets the in-place editor’s value.
Namespace : DevExpress.XtraBars
Assembly : DevExpress.XtraBars.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
[Browsable(true)]
[DefaultValue(null)]
public virtual object EditValue { get; set; }
<Browsable(True)>
<DefaultValue(Nothing)>
Public Overridable Property EditValue As Object
| Type | Default | Description |
|---|---|---|
| Object | null |
An Object that specifies the editor’s value.
|
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.
The following code shows how to:
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;
//...
}
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
' Create a BarEditItem with embedded SpinEdit in-place editor.
Dim item As BarEditItem = New BarEditItem(BarManager1)
item.Edit = BarManager1.RepositoryItems.Add("SpinEdit")
Bar1.AddItem(item)
AddHandler item.EditValueChanged, AddressOf BarEditItem1_EditValueChanged
' Specify the editor's initial value.
Dim initialValue As Integer = 0
item.EditValue = initialValue
End Sub
' Perform actions when the editor's value changes
Private Sub BarEditItem1_EditValueChanged(sender As Object, e As EventArgs)
Dim item As BarEditItem = CType(sender, BarEditItem)
Dim newValue As Object = item.EditValue
'...
End Sub
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.
winforms-workspacemanager-saving-load-app-layout/CS/T190543/Form1.cs#L40
this.selectWorkSpaceItem.EditValue = "Default";
winforms-spreadsheet-use-formula-engine/CS/FormulaEngineTest/Form1.cs#L22
spreadsheetControl1.Document.DocumentSettings.R1C1ReferenceStyle = true;
editExpressionStyle.EditValue = 0;
winforms-spreadsheet-load-and-save-a-password-encrypted-files/CS/EncryptionExample/Form1.cs#L29
((DevExpress.XtraEditors.Repository.RepositoryItemComboBox)(barEncryptionTypeComboBox.Edit)).Items.Add(currentValue.ToString());
barEncryptionTypeComboBox.EditValue = DevExpress.Spreadsheet.EncryptionType.Strong.ToString();
}
if(designer.SelectedDashboardItem is CustomDashboardItem<WebPageItemMetadata>)
urlBarItem.EditValue = selectedCustomItem.Metadata.URI;
}
winforms-bars-create-baredititem/CS/Form1.cs#L143
item.Edit = combo;
item.EditValue = "[n/a]";
item.Width = 100;
winforms-workspacemanager-saving-load-app-layout/VB/T190543/Form1.vb#L40
repositoryItemLookUpEdit1.Columns(2).Visible = False
selectWorkSpaceItem.EditValue = "Default"
workspaceManager1.CloseStreamOnWorkspaceSaving = DevExpress.Utils.DefaultBoolean.True
winforms-spreadsheet-use-formula-engine/VB/FormulaEngineTest/Form1.vb#L21
spreadsheetControl1.Document.DocumentSettings.R1C1ReferenceStyle = True
editExpressionStyle.EditValue = 0
winforms-spreadsheet-load-and-save-a-password-encrypted-files/VB/EncryptionExample/Form1.vb#L30
barEncryptionTypeComboBox.EditValue = EncryptionType.Strong.ToString()
End Sub
If TypeOf designer.SelectedDashboardItem Is CustomDashboardItem(Of WebPageItemMetadata) Then
urlBarItem.EditValue = selectedCustomItem.Metadata.URI
End If
winforms-bars-create-baredititem/VB/Form1.vb#L138
item.Edit = combo
item.EditValue = "[n/a]"
item.Width = 100
See Also