NullReferenceExpection in OnIsHighlightedChanged

4 posts, 0 answers
  1. Matthias Bibo
    Matthias Bibo avatar
    72 posts
    Member since:
    Mar 2010

    Posted 09 Jul 2014 Link to this post


    Hi,

    I am getting a NullReferenceException with the new Version of your Controls 2014Q2.

    The Exception is thrown in OnIsHighlightedChanged of the RadComboBoxItem.
    I was able to workaround it like this:


        public class BDLComboBoxItem : RadComboBoxItem
        {

            public BDLComboBoxItem()
            {       }

            protected override void OnIsHighlightedChanged(bool oldValue, bool newValue)
            {
                try
                {
                    base.OnIsHighlightedChanged(oldValue, newValue);
                }
                catch (System.Exception)
                {
                    // TG: Workaround für Bug in RadComboBoxItem -> NullReference Excepetion
                }
            }
        }

    And override the RadComboBox with this:

            protected override DependencyObject GetContainerForItemOverride()
            {
                return new BDLComboBoxItem();
            }

    This is a new Bug, we only have this problem with the new release.

    Best Regards
    Matthias
  2. Kalin
    Admin
    Kalin avatar
    1209 posts

    Posted 10 Jul 2014 Link to this post

    Hi Matthias,

    We are aware of the described issue and it has already been fixed. The fix is available with the latest internal build from this Monday. Could you please download it from your profile and give it a try?

    I apologize for any inconvenience caused. If you have any further questions or concerns, please let us know.

    Regards,
    Kalin
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  3. DevCraft banner
  4. Doug
    Doug avatar
    2 posts
    Member since:
    Jun 2010

    Posted 17 Jul 2014 in reply to Kalin Link to this post

    Hi,

    I am also having a similar problem. Can you guys give me a time frame of when you'll be releasing the next Telerik for Silverlight? I figure you'll have it before October so if so, please let me know if this fix is going to be in it. Until then I think I will have to take the same approach that Matthias did.
  5. Kalin
    Admin
    Kalin avatar
    1209 posts

    Posted 21 Jul 2014 Link to this post

    Hello Doug,

    The next official version of the controls (Q2 2014 SP1) is scheduled for release by the end of this month. Meanwhile you could use the latest internal build where the issue is already fixed. As for the workaround you could use the one mentioned here or if you are using the ComboBox to change the Themes at run time - you could manually close the drop down before setting the new theme in order to avoid the issue.

    Hope this helps.

    Regards,
    Kalin
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
Back to Top