Hi,
I have for example following GridView:
<telerik:RadGridView x:Name="gvSystems" Grid.Row="1" Grid.Column="0" DataContext="{Binding}" ItemsSource="{Binding Systems}" AutoGenerateColumns="False"
ShowSearchPanel="False" ShowGroupPanel="False" ShowGroupFooters="False" IsFilteringAllowed="True" FilteringMode="FilterRow" IsReadOnly="True" GroupRenderMode="Flat"
SelectionMode="{Binding QueryFilterModel.MultiSelectSystems, Converter={StaticResource BoolToSelectionModeConverter}}" Margin="3" CanUserSortColumns="True">
<telerik:RadGridView.Columns>
<telerik:GridViewDataColumn IsSortable="True" Header="{Binding Path=[VXScada_GernericQueries_GridView_ID], Source={x:Static commonUIRes:TextContainer.Instance}}" DataMemberBinding="{Binding SystemID}" />
<telerik:GridViewDataColumn IsSortable="True" Header="{Binding Path=[VXScada_GernericQueries_GridView_Name], Source={x:Static commonUIRes:TextContainer.Instance}}" DataMemberBinding="{Binding SystemName}" />
</telerik:RadGridView.Columns>
</telerik:RadGridView>
If I click into the header to sort my application crashes with following Exception (This happens with each RadGridView I have):
System.NullReferenceException
Source: Telerik.Windows.Data
StackTrace:
bei Telerik.Windows.Data.QueryableCollectionView.InternalGetItemAt(Int32 index)
bei Telerik.Windows.Data.QueryableCollectionView.GetItemAt(Int32 index)
bei Telerik.Windows.Data.DataItemCollection.get_Item(Int32 index)
bei Telerik.Windows.Controls.GridView.Rows.GetRowItemsAtRange(Int32 startIndex, Int32 endIndex)
bei Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.FlatLayoutStrategy.RealizeRows(Int32 startIndex, Int32 endIndex, Double& verticalOffset, HashSet`1& realizedRows)
bei Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.FlatLayoutStrategy.MeasureOverride(Size availableSize)
bei Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.MeasureOverride(Size availableSize)
bei System.Windows.FrameworkElement.MeasureCore(Size availableSize)
bei System.Windows.UIElement.Measure(Size availableSize)
bei System.Windows.ContextLayoutManager.UpdateLayout()
bei System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
bei System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
bei System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
bei System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
bei System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
bei System.Windows.Threading.DispatcherOperation.InvokeImpl()
bei MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
bei System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
bei MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
bei System.Windows.Threading.DispatcherOperation.Invoke()
bei System.Windows.Threading.Dispatcher.ProcessQueue()
bei System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
bei MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
bei MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
bei System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
bei System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
bei MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
bei MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
bei System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
bei System.Windows.Application.RunDispatcher(Object ignore)
bei System.Windows.Application.RunInternal(Window window)