RadCombobox not displaying the SelectedValue after closing and opening the application

2 posts, 0 answers
  1. Dharmavaram
    Dharmavaram avatar
    101 posts
    Member since:
    Jun 2013

    Posted 03 Nov 2017 Link to this post

    Hi,

    I have binded custom object collection to the RaCombobox selecting an item and saving is working fine but displaying the item again once we close and open the application is not working.

     

                        <telerik:RadComboBox Name="AppContextNames" Width="150" Height="25" SelectedItem="{Binding AppContext,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" ItemsSource="{Binding Path=DataContext.SharedActionVM.AppContextCollection,RelativeSource={RelativeSource AncestorType={x:Type telerik:RadTreeListView}}}" DisplayMemberPath="Name" />

    Here while setting it is working fine but again if go to that combobox  even the AppContext object contains value it is showing empty combo value but combocollection is present.

    Is there something I have to do from my side??

    Regards,

    Nagasree.

     

     

     

     

     

  2. Dinko
    Admin
    Dinko avatar
    707 posts

    Posted 08 Nov 2017 Link to this post

    Hi Dharmavaram,

    Thank you for contacting us.

    Using only the provided code snippet I am not exactly sure what is the set-up in your main application. How you have saved and load the combo box? You can elaborate more on your scenario. It will be great if you can send me isolated project from your application reproducing this behavior so I can directly investigate it on my side. This way I could have better look at your set up.

    I have created a sample project to test your scenario which used our PersistenceFramework to save and load the control. The project is attached to this reply. When you run the project select different item from the combo box and pressed the save button. Then close the application and run it again. You can observe that the last selected item is loaded correctly. 

    Regards,
    Dinko
    Progress Telerik
    Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Back to Top