Hello,
I have a problem with the Q1 2013 version that was not in the previous, Q3 2012 SP1, version.
In my application, I have a list of rankings in a TabItem (Microsoft, not Telerik). When I double-click on a ranking, the details of the ranking are displayed in a new TabItem. Now, if I close the tab item with the ranking details, I have the following error:
Error message= Error: Unhandled Error in Silverlight Application
Code: 4004
Category: ManagedRuntimeError
Message: System.ArgumentNullException: Column cannot be null
Parameter name: newColumn
at Telerik.Windows.Controls.GridView.ColumnSortDescriptor.OnColumnChanged(GridViewColumn oldColumn, GridViewColumn newColumn)
at Telerik.Windows.Controls.GridView.ColumnSortDescriptor.OnColumnPropertyChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
at Telerik.Windows.PropertyMetadata.PropertyChangeHook.OnPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
at System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp, Object oldValue, Object newValue)
at System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation)
at System.Windows.DependencyObject.RefreshExpression(DependencyProperty dp)
at System.Windows.Data.BindingExpression.SendDataToTarget()
at System.Windows.Data.BindingExpression.SourcePropertyChanged(PropertyPathListener sender, PropertyPathChangedEventArgs args)
at System.Windows.PropertyPathListener.ReconnectPath()
at System.Windows.PropertyPathListener.RaisePropertyPathStepChanged(PropertyPathStep source)
at System.Windows.IndexerPathStep.RaisePropertyPathStepChanged(PropertyListener source)
at System.Windows.IndexerListener.SourcePropertyChanged(Object sender, PropertyChangedEventArgs args)
at System.Windows.Data.WeakPropertyChangedListener.PropertyChangedCallback(Object sender, PropertyChangedEventArgs args)
at System.Collections.ObjectModel.ObservableCollection`1.OnPropertyChanged(PropertyChangedEventArgs e)
at System.Collections.ObjectModel.ObservableCollection`1.ClearItems()
at Telerik.Windows.Controls.GridViewColumnCollectionInternal.ClearItems()
at System.Collections.ObjectModel.Collection`1.Clear()
at Telerik.Windows.Controls.GridView.GridViewDataControl.TotalColumnRefresh()
at Telerik.Windows.Controls.GridView.GridViewDataControl.MeasureOverride(Size availableSize)
at System.Windows.FrameworkElement.MeasureOverride(IntPtr nativeTarget, Single inWidth, Single inHeight, Single& outWidth, Single& outHeight)
I've look at what can cause this error and found that the following XAML code, in the list of rankings, is the cause of the error:
If I comment out this code or replace it with a normal SortDescriptor, the error is gone.
I've also found other problems with ColumnSortDescriptor, where the column is not found (even if it exists) and the application crash.
Perhaps a check for null for the column in your code would avoid many crashes.
Patrick
I have a problem with the Q1 2013 version that was not in the previous, Q3 2012 SP1, version.
In my application, I have a list of rankings in a TabItem (Microsoft, not Telerik). When I double-click on a ranking, the details of the ranking are displayed in a new TabItem. Now, if I close the tab item with the ranking details, I have the following error:
Error message= Error: Unhandled Error in Silverlight Application
Code: 4004
Category: ManagedRuntimeError
Message: System.ArgumentNullException: Column cannot be null
Parameter name: newColumn
at Telerik.Windows.Controls.GridView.ColumnSortDescriptor.OnColumnChanged(GridViewColumn oldColumn, GridViewColumn newColumn)
at Telerik.Windows.Controls.GridView.ColumnSortDescriptor.OnColumnPropertyChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
at Telerik.Windows.PropertyMetadata.PropertyChangeHook.OnPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
at System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp, Object oldValue, Object newValue)
at System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation)
at System.Windows.DependencyObject.RefreshExpression(DependencyProperty dp)
at System.Windows.Data.BindingExpression.SendDataToTarget()
at System.Windows.Data.BindingExpression.SourcePropertyChanged(PropertyPathListener sender, PropertyPathChangedEventArgs args)
at System.Windows.PropertyPathListener.ReconnectPath()
at System.Windows.PropertyPathListener.RaisePropertyPathStepChanged(PropertyPathStep source)
at System.Windows.IndexerPathStep.RaisePropertyPathStepChanged(PropertyListener source)
at System.Windows.IndexerListener.SourcePropertyChanged(Object sender, PropertyChangedEventArgs args)
at System.Windows.Data.WeakPropertyChangedListener.PropertyChangedCallback(Object sender, PropertyChangedEventArgs args)
at System.Collections.ObjectModel.ObservableCollection`1.OnPropertyChanged(PropertyChangedEventArgs e)
at System.Collections.ObjectModel.ObservableCollection`1.ClearItems()
at Telerik.Windows.Controls.GridViewColumnCollectionInternal.ClearItems()
at System.Collections.ObjectModel.Collection`1.Clear()
at Telerik.Windows.Controls.GridView.GridViewDataControl.TotalColumnRefresh()
at Telerik.Windows.Controls.GridView.GridViewDataControl.MeasureOverride(Size availableSize)
at System.Windows.FrameworkElement.MeasureOverride(IntPtr nativeTarget, Single inWidth, Single inHeight, Single& outWidth, Single& outHeight)
I've look at what can cause this error and found that the following XAML code, in the list of rankings, is the cause of the error:
<
tk:GridView.SortDescriptors
>
<
tk:ColumnSortDescriptor
Column
=
"{Binding Columns[LastChangeDT], ElementName=GridView}"
SortDirection
=
"Descending"
/>
</
tk:GridView.SortDescriptors
>
If I comment out this code or replace it with a normal SortDescriptor, the error is gone.
I've also found other problems with ColumnSortDescriptor, where the column is not found (even if it exists) and the application crash.
Perhaps a check for null for the column in your code would avoid many crashes.
Patrick