DataForm DataFormComboBoxField SelectedItem Becomes Null After Commit Button Click
Environment
Product Version | |
Product | RadDataForm for WPF |
Description
The following setup produces a null
value in the SelectedItem
of the RadDataFormComboBoxField on Commit button click.
<telerik:DataFormComboBoxField DataMemberBinding="{Binding SelectedItem}"
ItemsSource="{Binding Items}" />
Solution
To resolve this, add a RadComboBox
control directly inside of the Content
of the data field.
<telerik:DataFormComboBoxField>
<telerik:RadComboBox SelectedItem="{Binding SelectedItem}"
ItemsSource="{Binding Items}" />
</telerik:DataFormComboBoxField>