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

NullReferenceExpection in OnIsHighlightedChanged

3 Answers 35 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Matthias Bibo
Top achievements
Rank 1
Matthias Bibo asked on 09 Jul 2014, 12:35 PM

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

3 Answers, 1 is accepted

Sort by
0
Kalin
Telerik team
answered on 10 Jul 2014, 07:00 AM
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.
 
0
Doug
Top achievements
Rank 1
answered on 17 Jul 2014, 05:38 PM
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.
0
Kalin
Telerik team
answered on 21 Jul 2014, 03:08 PM
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.
 
Tags
ComboBox
Asked by
Matthias Bibo
Top achievements
Rank 1
Answers by
Kalin
Telerik team
Doug
Top achievements
Rank 1
Share this question
or