Two comboboxes - the user makes a selection in the first which provides a default value for the 2nd. This works well until a series of keystrokes happen. If the 2nd gets the focus, but not changed, then the first gets the focus, the default value disappears for the 2nd.
What would cause the default value disappear?
I suspect the second combo is not set up correctly but I'm not sure how to fix it.
<telerik:RadComboBox x:Name="cboGlaze" FontSize="16" Background="#F6F8FA" BorderBrush="#D7D8DD"
ItemsSource="{Binding}"
Text="{Binding glaze, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
telerik:TextSearch.TextPath="Glaze"
IsEditable="True" IsReadOnly="True"
Style="{DynamicResource RadComboBoxStyle3}" >
<telerik:RadComboBox.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding Glaze}"></TextBlock>
<TextBlock Text="{Binding pctUpcharge}" Grid.Column="1"></TextBlock>
</Grid>
</DataTemplate>
</telerik:RadComboBox.ItemTemplate>
Binding to the property "glaze" is handled in the DropDown event for the first combo.
Thanks for any help or advice.
Try to bind the SelectedValue
property of the RadComboBox
to the glaze
source property and set the SelectedValuePath
property to "Glaze" provided that the DataTable
contains a column with this name:
<telerik:RadComboBox x:Name="cboGlaze" FontSize="16" Background="#F6F8FA" BorderBrush="#D7D8DD"
ItemsSource="{Binding}"
SelectedValuePath="Glaze"
SelectedValue="{Binding glaze}"
telerik:TextSearch.TextPath="Glaze"
IsEditable="True" IsReadOnly="True"
Style="{DynamicResource RadComboBoxStyle3}" >
...