Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > ComboBox > RadComboBox pushing null to SelectedItem/SelectedValue upon load

Not answered RadComboBox pushing null to SelectedItem/SelectedValue upon load

Feed from this thread
  • yonadav avatar

    Posted on Feb 4, 2010 (permalink)

    Hi All,

    This is another issue we've started encountering only after the move to Q3 SP2 2009 (we were at Q3 2009 yesterday).

    If, for example, we've defined a RadComboBox like so:
    <telerik:RadComboBox SelectedValue="{Binding Setting}" 
                                      ItemsSource="{Binding PossibleValues,Mode=OneWay}" 
                                      SelectedValuePath="UniqueName" 
                                      DisplayMemberPath="FriendlyName" /> 

    And we place a breakpoint in the Setting property's set function (noticed its bound to SelectedValue). Then every time the RadComboBox we get a call to set with a value of null. Similar things happen when binding to SelectedItem.

    Oddly enough, we did not have this issue in Q3 2009 (re-tested today).

    Any ideas?

    Thanks,
    yonadav

    Reply

  • Tony Mocella avatar

    Posted on Feb 25, 2010 (permalink)

    We've noticed the same behavior in our project (also using 2009 Q3 SP2). Is this something that is fixed in the 2010 Q1 release?

    Reply

  • Valeri Hristov Valeri Hristov admin's avatar

    Posted on Feb 27, 2010 (permalink)

    Hello Tony,

    Could you open a new support ticket and send me a simple application that could be used to observe the problem? We will do our best to provide a fix by Q1 2010, that is scheduled in a couple of weeks.

    Sincerely yours,
    Valeri Hristov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.

    Reply

  • yonadav avatar

    Posted on Mar 9, 2010 (permalink)

    Hi Tony,

    In the meantime, you can do what we did:

    We set up a between the combo box's Tag property  to the value in a OneTime mode, such as:

    <telerik:RadComboBox ... Tag="{Binding Something,Mode=OneTime}" />

    This saves the inital value there. Then, we hook the combo box's Loaded Event where we copy the value from the Tag to the SelectedValue (or SelectedItem, depending on the case).

    HTH,
    yonadav

    Reply

  • Valeri Hristov Valeri Hristov admin's avatar

    Posted on Mar 10, 2010 (permalink)

    Hi,

    Did you place RadComboBox inside a RadGridView CellEditTemplate? If you did, the problem is known and will be fixed in the near future. If you didn't a sample application demonstrating the problem would be of great help.

    All the best,
    Valeri Hristov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.

    Reply

  • Tony Mocella avatar

    Posted on Mar 10, 2010 (permalink)

    I think the issue in our case was our EntityFramework classes nullifying the values in our objects when the selected-items get changed via a bound-element on the screen.  We'll work through that issue and circle back if we are still having problems.

    Thanks for the pointers.

    Reply

  • yonadav avatar

    Posted on Mar 10, 2010 (permalink)

    Hi Valeri,

    We've placed it within an editor template of the MindScape WPF Property Grid. I have a feeling it has a similar behavior to the CellEditTemplate...

    When will this be corrected?

    Thanks,
    yonadav

    Reply

  • Nedyalko Nikolov Nedyalko Nikolov admin's avatar

    Posted on Mar 15, 2010 (permalink)

    Hi yonadav,

    The problem comes from the fact that when RadComboBox.ItemsSource is changed (in this case with null) combo box changes its selected index (value) and through binding updates underlying data object (also with null). I think that this is an expected behavior of the RadComboBox.
    In our case (RadGridView and CellEditTemplate) the grid control sets RadComboBox.DataContext to null when cell edit is ended which causes the problem.

    We've already fixed the issue and fix will be available with the next latest internal build (every Friday).

    Unfortunately the fix is within RadGridView domain. So I think that this won't fix your scenario with "MindScape WPF Property Grid".

    Don't hesitate to contact us if you have other questions.


    All the best,
    Nedyalko Nikolov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.

    Reply

  • Simon avatar

    Posted on Jul 26, 2011 (permalink)

    We're experiencing the same problem with the latest controls (Version 2011.2.712.1040).
    The RadComboBox's SelectedItem is bound to a property on the ViewModel.
    However the property on load is being set to Null by the RadComboBox.

    Our RadComboBox sits within a ControlTemplate....
    <ControlTemplate x:Key="EditAppointmentTemplate"
              TargetType="TelerikSchedule:SchedulerDialog">

    ...and the RadComboBox sits within a Grid.

    When we replace the RadComboBox with a normal ComboBox control - the problem goes away.
    Is there a fix for this - we really would like to keep using the Telerik RadComboBox.

    Thanks

    EDIT----Further to this...
    If I open my EditAppointmentTemplate every alternate time it works. I do not select another appointment in between this.
    So
    Open 1st time  - RadComboBox sets the property to nulll.
    Open 2nd time   - RadComboBox gets the property correctly - based on RIA value
    Open 3rd time -  - RadComboBox sets the property to nulll.
    Open 4th time -   - RadComboBox sets the property correctly - base on RIA value
    etc etc


    Reply

  • Valeri Hristov Valeri Hristov admin's avatar

    Posted on Jul 27, 2011 (permalink)

    Hello Simon,

    I would need a sample application in order to provide specific advice. I suppose this thread is about different problem...

    Kind regards,
    Valeri Hristov
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

    Reply

  • YYZRichard avatar

    Posted on Jan 30, 2012 (permalink)

    Is there any fix schedule for this problem?
    I've got the latest version (as of Jan-2012) and I'm still having the same problem.
    I cannot set the the selected item.

    The combobox is populated successfully, and the properties "SelectedValuePath" and "DisplayValuePath" are pointing to the correct fields.
    When I set the value to...
    MyRadComboBox.SelectedValue = "2";
    ... it's still showing as null, eventhough the item exists in the combobox.

    Reply

  • Valeri Hristov Valeri Hristov admin's avatar

    Posted on Feb 3, 2012 (permalink)

    Hello Richard,

    Could you please, send us a simple application that demonstrates the problem? We never received similar feedback as you describe your problem, so I think it would be best to investigate an application in order to determine if this is a bug in RadComboBox, or in your application.

    Greetings,
    Valeri Hristov
    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 / WPF > ComboBox > RadComboBox pushing null to SelectedItem/SelectedValue upon load
Related resources for "RadComboBox pushing null to SelectedItem/SelectedValue upon load"

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