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

NullReferenceException in SL Q3 SP1

1 Answer 42 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
naip
Top achievements
Rank 2
naip asked on 10 Dec 2009, 01:36 PM
Hello,

my code run fine under SL Q3 - yesterday i´ve updated to SL Q3 SP1 (V2009.3.1208) and I get NullReferenceExceptions from the RadComboBox.

Scenario:

1) RadComboBox in xaml:
<telerikInput:RadComboBox x:Name="myValueSelector" VerticalAlignment="Top" Margin="0,0,26,0" IsEditable="True"
Text="{Binding QualifiedValue, Mode=TwoWay}" FilteringMode="StartsWith" StaysOpenOnEdit="True" OpenDropDownOnFocus="True"/>

2) The DataContext of the RadComboBox is set to an instance of SelectedQualifiedValue (a simple helper class for databinding)
    public class SelectedQualifiedValue: INotifyPropertyChanged
    {
        public event PropertyChangedEventHandler PropertyChanged;
        private string myQualifiedValue;
        public string QualifiedValue
        {
            get { return myQualifiedValue; }
            set
            {
                if (myQualifiedValue != value)
                {
                    myQualifiedValue = value;
                    if (PropertyChanged != null)
                    {
                        PropertyChanged(this, new PropertyChangedEventArgs("QualifiedValue"));
                    }
                }
            }
        }
    }

3) The ItemsSource of the RadComboBox is set to a collection of strings.

4) The DataContext SelectedQualifiedValue.QualifiedValue is set to string contained in the collection.

5) SelectedQualifiedValue.PropertyChanged is raised as intended, but in SP1 the RadComboBox throws a NullRefernceException:

System.NullReferenceException occurred
  Message="Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt."
  StackTrace:
       bei Telerik.Windows.Controls.RadComboBox.UpdateItemsVisibility(Boolean showAll, List`1 matchIndices)
 

A quick fix would be appreciated...


Best regards,
Thomas

1 Answer, 1 is accepted

Sort by
0
naip
Top achievements
Rank 2
answered on 14 Dec 2009, 06:40 AM
Hello,

the problem has been fixed in the latest build (2009_3_1211). Thanks!

Best regards,
Thomas
Tags
ComboBox
Asked by
naip
Top achievements
Rank 2
Answers by
naip
Top achievements
Rank 2
Share this question
or