windowsforms-devexpress-dot-xtraeditors-dot-comboboxedit-3be2f376.md
Allows you to select an item with the specific value, or to read the currently selected item’s value. You can also use the ComboBoxEdit.SelectedItem property to do the same. Additionally, EditValue allows you to specify a custom editor value.
Namespace : DevExpress.XtraEditors
Assembly : DevExpress.XtraEditors.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
[DXCategory("Data")]
public override object EditValue { get; set; }
<DXCategory("Data")>
Public Overrides Property EditValue As Object
| Type | Description |
|---|---|
| Object |
The edit value.
|
The code sample below illustrates how to select a “Default” item in an in-place ComboBox editor when a user activates a cell.
private void gridView1_ShownEditor(object sender, EventArgs e)
{
GridView currentView = sender as GridView;
ComboBoxEdit cmbPO = currentView.ActiveEditor as ComboBoxEdit;
cmbPO.EditValue = "Default";
}
Private Sub gridView1_ShownEditor(ByVal sender As Object, ByVal e As EventArgs)
Dim currentView As GridView = TryCast(sender, GridView)
Dim cmbPO As ComboBoxEdit = TryCast(currentView.ActiveEditor, ComboBoxEdit)
cmbPO.EditValue = "Default"
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.
Convert.ToSingle(HorizontalPitchSpinEdit.EditValue),
(DXGraphicsUnit)UnitComboBox.EditValue,
Convert.ToSingle(BottomMarginSpinEdit.EditValue),
winforms-scheduler-sync-with-outlook/CS/SyncWithOutlook/Form1.cs#L43
private void btnSchedulerOutlook_Click(object sender, EventArgs e) {
if(comboBoxEdit1.EditValue != null)
{
how-to-keep-a-look-and-feel-of-windows-forms-in-sync-e2243/CS/ThreadedSkinning/Form1.cs#L18
comboBoxEdit1.EditValue = DevExpress.LookAndFeel.UserLookAndFeel.Default.SkinName;
foreach(DevExpress.Skins.SkinContainer cnt in DevExpress.Skins.SkinManager.Default.Skins) {
winforms-workspacemanager-saving-load-app-layout/CS/T190543/Form1.cs#L60
if (edit != null) {
TransitionType value = (TransitionType)edit.EditValue;
BaseTransition transition = null;
winforms-scheduler-sync-outlook-calendars/CS/SyncWithOutlook/Form1.cs#L36
private void btnSchedulerOutlook_Click(object sender, EventArgs e) {
if(comboBoxEdit1.EditValue != null) {
synchronizerHelper.CalendarFolder = comboBoxEdit1.EditValue.ToString();
Dim builder As New CustomLabelReportBuilder()
Dim labelReport As XtraReport = builder.GenerateLabelReport(Convert.ToSingle(LabelWidthSpinEdit.EditValue), Convert.ToSingle(LabelHeightSpinEdit.EditValue), Convert.ToSingle(VerticalPitchSpinEdit.EditValue), Convert.ToSingle(HorizontalPitchSpinEdit.EditValue), DirectCast(UnitComboBox.EditValue, DevExpress.Drawing.DXGraphicsUnit), Convert.ToSingle(BottomMarginSpinEdit.EditValue), Convert.ToSingle(TopMarginSpinEdit.EditValue), Convert.ToSingle(LeftMarginSpinEdit.EditValue), Convert.ToSingle(RightMarginSpinEdit.EditValue), Convert.ToInt32(lookUpPaperType.EditValue))
Return labelReport
winforms-scheduler-sync-with-outlook/VB/SyncWithOutlook/Form1.vb#L45
Private Sub btnSchedulerOutlook_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnSchedulerOutlook.Click
If comboBoxEdit1.EditValue IsNot Nothing Then
' #Region "#scheduler->outlook"
how-to-keep-a-look-and-feel-of-windows-forms-in-sync-e2243/VB/ThreadedSkinning/Form1.vb#L15
InitializeComponent()
comboBoxEdit1.EditValue = UserLookAndFeel.Default.SkinName
For Each cnt As DevExpress.Skins.SkinContainer In DevExpress.Skins.SkinManager.Default.Skins
winforms-workspacemanager-saving-load-app-layout/VB/T190543/Form1.vb#L57
If edit IsNot Nothing Then
Dim value As TransitionType = CType(edit.EditValue, TransitionType)
Dim transition As BaseTransition = Nothing
winforms-scheduler-sync-outlook-calendars/VB/SyncWithOutlook/Form1.vb#L38
Private Sub btnSchedulerOutlook_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnSynchronization.Click
If comboBoxEdit1.EditValue IsNot Nothing Then
synchronizerHelper.CalendarFolder = comboBoxEdit1.EditValue.ToString()
See Also