When you use a ComboBox or MultiColumnComboEditor Column you typically bind it to an items source containing a list of valid values that may be selected from the combobox. What I'm looking for is the ability to offer a list of pre-defined values in the combobox, while still allowing the user to enter a custom value; so basically the values in the combobox are suggested or common values, but the user can enter a value that is not in the combobox if they want. In the WPF Combobox control, the equivalent of this is setting the IsEditable property to true.
Is this functionality possible using the Infragistics WPF XamGrid (or XamDataGrid) controls?
Hello deadlydog,
I have been looking into your requirement and there is such functionality in the XamComboEditor (the one from InfragisticsWPF4.Editors.v11.2). This is the one used in the XamDataGrid and it also has an IsEditable property that works as you’d expect.
Please let me know if I can be of any further assistance on the matter.
Thanks, I'm new to Infragistics and am just trying out the controls. I was looking for the IsEditable property on the <igEditors:ComboBoxItemsProvider> and <igDP:FieldSettings> attributes, but wasn't able to find it. In the end I was able to apply it using a style like so:
<igEditors:ComboBoxItemsProvider x:Key="DataCenterProvider" DisplayMemberPath="Name" ValuePath="Value" ItemsSource="{Binding Path=DataCenters}" /> <Style x:Key="DataCenterFieldStyle" TargetType="{x:Type igEditors:XamComboEditor}"> <Setter Property="ItemsProvider" Value="{StaticResource DataCenterProvider}" /> <Setter Property="IsEditable" Value="True" /> </Style>
....
<igDP:FieldLayout.Fields>
<igDP:Field Name="DataCenter" Label="Data Center"> <igDP:Field.Settings> <igDP:FieldSettings EditorStyle="{StaticResource DataCenterFieldStyle}" /> </igDP:Field.Settings> </igDP:Field>
Thought I'd post my solution for anybody else who runs into this in the future. Thanks.