Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > ComboBox > RadComboBox, Enum and item value

Not answered RadComboBox, Enum and item value

Feed from this thread
  • Gabriel avatar

    Posted on Jan 23, 2012 (permalink)

    I've used this link to bind my Enum to my RadComboBox but when I browse thru the items, the combobox does not select anything, its always empty. I've check my ViewModel and it does make a Get to grab the value and send it to the converter. And if I change the selected item, it will update the ViewModel with the new selection and the ComboBox will also display the correct value. Again, if I navigate away and back to this item, the RadComboBox will be empty. Here's my RadCombobox XAML:

    <telerik:RadComboBox
        HorizontalAlignment="Left"  Height="25" MinWidth="75"
        VerticalAlignment="Top"               
        ItemsSource="{Binding Source={StaticResource QueryDocumentsEnumerationDS}, Path=Values, Mode=OneWay}"
        DisplayMemberPath=""
        SelectedValue="{Binding DocumentOnly, Mode=TwoWay, Converter={StaticResource EnumConverter}}"                                 
        Margin="0,0,8,0" />

    Any clues?

    thanks

    Reply

  • Gabriel avatar

    Posted on Jan 24, 2012 (permalink)

    Solved, and I insist it was not my fault...

    In a previous attempt to bind to enum, I used a converter which have persisted in the previous code. Here the code that work:

    <telerik:RadComboBox
        HorizontalAlignment="Left"  Height="25" MinWidth="75"
        VerticalAlignment="Top"              
        ItemsSource="{Binding Source={StaticResource QueryDocumentsEnumerationDS}, Path=Values, Mode=OneWay}"
        DisplayMemberPath=""
        SelectedValue="{Binding DocumentOnly, Mode=TwoWay}"                                
        Margin="0,0,8,0" />

    Reply

  • Yana Yana admin's avatar

    Posted on Jan 26, 2012 (permalink)

    Hello Gabriel,

    I'm glad the you've managed to fix the issue by yourself. We will review the article.

    Kind regards,
    Yana
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > ComboBox > RadComboBox, Enum and item value
Related resources for "RadComboBox, Enum and item value"

Silverlight ComboBox Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  ]