0

I am working with a ComboBoxEdit from DevExpress.

I have come across this post, where i need the same behavior for my ComboBoxEdit. I need the user to be able to type a value in the ComboBoxEdit, even though the value is not in the list of bound objects.

This is what i have so far:

<dxe:ComboBoxEdit Name="someName"
              Height="Auto" 
              Width="Auto"
              ImmediatePopup="True"
              AutoComplete="True"
              IncrementalFiltering="True"
              IsEnabled="True"
              Visibility="Visible"
              VerticalAlignment="Stretch" 
              HorizontalAlignment="Stretch"
              IsTextEditable="True"
              VerticalContentAlignment="Stretch" 
              HorizontalContentAlignment="Right"
              Mask="###,###,###,##0.00;###,###,###,##0.00-"
              MaskType="Numeric"
              DisplayFormatString="###,###,###,##0.00;###,###,###,##0.00-"
              MaskUseAsDisplayFormat="True"
              ItemsSource="{Binding Path=SomeItemsSource}"
              DisplayMember="{Binding Path=SomeDisplayMember}"
              ValueMember="{Binding Path=SomeValueMember}"
              EditValue="{Binding Path=SomeEditValue}">
<dxe:ComboBoxEdit.StyleSettings>
    <dxe:ComboBoxStyleSettings />
</dxe:ComboBoxEdit.StyleSettings>

Everything works fine, but i cant type in a value that is not in the list.

How can i get the same behavior as in the mentioned post for my ComboBoxEdit?

Community
  • 1
  • 1
Willem
  • 9,166
  • 17
  • 68
  • 92

2 Answers2

1

Need to set : ValidateOnTextInput="False"

Willem
  • 9,166
  • 17
  • 68
  • 92
  • 1
    Unfortunately that solution doesn't work right. You can enter a custom text, yes, but if you press enter or klick outside(loose focus) the most similar object from ItemsSource is chosen. – Houve Feb 28 '19 at 14:33
0

try to use a "Devexpress.XtraEditors.MRUEdit"

YosiFZ
  • 7,792
  • 21
  • 114
  • 221
Cadburry
  • 1,844
  • 10
  • 21
  • 1
    You're better to answer by not asking another question, as it might be flagged as "Not an answer". –  Jul 05 '12 at 10:44