This is a migrated thread and some comments may be shown as answers.

Editable ComboBox formatted item selection does not work

0 Answers 48 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Manas
Top achievements
Rank 1
Manas asked on 04 Oct 2010, 05:53 PM
*Sorry had to repost this again as I could not change the Thread title of my previous post*
Hello there,
I need to convert the Transactiondate (of type DateTime) to show in 24 hour format in a Combobox
with IsEditable=True. Upon selection of an item the ComboBox needs to show the selected date in 24hr format.


The below version converts the dates to 24hr format fine but up on Item selection it shows the class name
instead of the selected date in 24 hr format): What am I doing wrong or missing?

<telerikInput:RadComboBox x:Name="ccTransactionDate" IsEditable="True" Grid.Row="2" Grid.Column="1">
<telerikInput:RadComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=TransactionDate, StringFormat='MM/dd/yyyy HH:mm:ss'}" />
</DataTemplate>
</telerikInput:RadComboBox.ItemTemplate>
</telerikInput:RadComboBox>







However when IsEditable is False it Works fine (but don't want to use this because want editable ComboBox):



<telerikInput:RadComboBox x:Name="ccTransactionDate" IsEditable="False" Grid.Row="2" Grid.Column="1">
<telerikInput:RadComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=TransactionDate, StringFormat='MM/dd/yyyy HH:mm:ss'}" />
</DataTemplate>
</telerikInput:RadComboBox.ItemTemplate>
</telerikInput:RadComboBox>







Thanks,
Manas

No answers yet. Maybe you can help?

Tags
ComboBox
Asked by
Manas
Top achievements
Rank 1
Share this question
or