I have a RadComboBox that is attached to DateTime type member of a Class collection. When I make the IsEditable="true" in the XAML, on Selection of an item from the ComboBox it shows the ToString() of the Class it self. If IsEditable="false" the Selected Text shows the date selected. I am actually using a Converter that converts the TransactionDate from Universal Time to local. In the pasted code I have simplfied it to just use the TransactionDate without any conversion. However without the converter also I see the same behavior on item selection from the RadComboBox (it shows the ToString() of the Class).
Simplified Code:
<telerikInput:RadComboBox x:Name="radCombo" IsEditable="True" Height="25" Width="120" ItemsSource="{Binding}" Grid.Row="6" Grid.Column="1">
<telerikInput:RadComboBox.ItemTemplate>
<DataTemplate >
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding TransactionDate}" Grid.Column="0" />
</Grid>
</DataTemplate>
</telerikInput:RadComboBox.ItemTemplate>
</telerikInput:RadComboBox>
Actual Code: (please note that the above simplified code without the Converter also shows the Class name rather than the selected item on selection when editable is turned on)
<telerikInput:RadComboBox x:Name="radCombo" IsEditable="True" Height="25" Width="120" ItemsSource="{Binding}" Grid.Row="6" Grid.Column="1">
<telerikInput:RadComboBox.ItemTemplate>
<DataTemplate >
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding Converter={StaticResource dateLocal}, Path=TransactionDate}" Grid.Column="0" />
</Grid>
</DataTemplate>
</telerikInput:RadComboBox.ItemTemplate>
</telerikInput:RadComboBox>
Thanks,
Manas
Simplified Code:
<telerikInput:RadComboBox x:Name="radCombo" IsEditable="True" Height="25" Width="120" ItemsSource="{Binding}" Grid.Row="6" Grid.Column="1">
<telerikInput:RadComboBox.ItemTemplate>
<DataTemplate >
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding TransactionDate}" Grid.Column="0" />
</Grid>
</DataTemplate>
</telerikInput:RadComboBox.ItemTemplate>
</telerikInput:RadComboBox>
Actual Code: (please note that the above simplified code without the Converter also shows the Class name rather than the selected item on selection when editable is turned on)
<telerikInput:RadComboBox x:Name="radCombo" IsEditable="True" Height="25" Width="120" ItemsSource="{Binding}" Grid.Row="6" Grid.Column="1">
<telerikInput:RadComboBox.ItemTemplate>
<DataTemplate >
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding Converter={StaticResource dateLocal}, Path=TransactionDate}" Grid.Column="0" />
</Grid>
</DataTemplate>
</telerikInput:RadComboBox.ItemTemplate>
</telerikInput:RadComboBox>
Thanks,
Manas