Home Forums WPF controls Xceed DataGrid for WPF unexpected internal failure on sort

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #25407 |

    Hi,
    I’m trying to implement the workaround specified here http://forums.xceed.com/forums/ShowPost.aspx?PostID=9587. I reproduced the code and I get
    the following exception when I click on a column to sort:
    Xceed.Wpf.DataGrid.DataGridInternalException was unhandled
    Message=”An unexpected internal failure occurred in the Xceed WPF DataGrid control.”
    Source=”Xceed.Wpf.DataGrid”
    StackTrace:
    at Xceed.Wpf.DataGrid.DataGridItemProperty.GetValue(Object component)
    at Xceed.Wpf.DataGrid.DataGridCollectionView.PrepareSort(SortDescriptionInfo[]& sortDescriptionInfos)
    at Xceed.Wpf.DataGrid.DataGridCollectionView.DeferredOperationManager.Process(Boolean processAll)
    at Xceed.Wpf.DataGrid.DataGridCollectionView.DeferredOperationManager.Process()
    at Xceed.Wpf.DataGrid.DataGridCollectionView.DeferRefreshHelper.Dispose()
    at System.Windows.Controls.ItemCollection.EndDefer()
    at System.Windows.Controls.ItemCollection.DeferHelper.Dispose()
    at Xceed.Wpf.DataGrid.DataGridControl.ApplyColumnSort(Column column, SortDirection sortDirection)
    at Xceed.Wpf.DataGrid.DataGridControl.ToggleColumnSort(Column column, ModifierKeys modifiers)
    at Xceed.Wpf.DataGrid.ColumnManagerCell.OnMouseLeftButtonUp(MouseButtonEventArgs e)
    at System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
    at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
    at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
    at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
    at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
    at System.Windows.UIElement.ReRaiseEventAs(RoutedEventArgs args, RoutedEvent newEvent)
    at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
    at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
    at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
    at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
    at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
    at System.Windows.UIElement.RaiseEventImpl(RoutedEventArgs args)
    at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
    at System.Windows.Input.InputManager.ProcessStagingArea()
    at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
    at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
    at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
    at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
    at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
    at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
    at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
    at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
    at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
    at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter)
    at System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg)
    at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
    at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
    at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
    at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
    at System.Windows.Threading.Dispatcher.Run()
    at System.Windows.Application.RunInternal(Window window)
    at System.Windows.Application.Run(Window window)
    at System.Windows.Application.Run()
    at DataGridSorting.App.Main() in D:\Colin\Code\Scrap\DataGridSorting\DataGridSorting\obj\Debug\App.g.cs:line 0
    at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
    at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
    at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
    at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
    at System.Threading.ThreadHelper.ThreadStart()
    InnerException:

    here’s the xaml
    <Window x:Class=”DataGridSorting.Window1″
    xmlns=”http://schemas.microsoft.com/winfx/2006/xaml/presentation&#8221;
    xmlns:x=”http://schemas.microsoft.com/winfx/2006/xaml&#8221;
    xmlns:xc=”http://schemas.xceed.com/wpf/xaml/datagrid&#8221;
    xmlns:s=”clr-namespace:System;assembly=mscorlib”
    xmlns:local=”clr-namespace:DataGridSorting”
    Title=”Window1″ Height=”300″ Width=”300″ x:Name=”root”>
    <Window.Resources>
    <xc:DataGridCollectionViewSource x:Key=”viewSource” Source=”{Binding Source={x:Static local:Window1.Data}}”>
    <xc:DataGridCollectionViewSource.ItemProperties>
    <xc:DataGridItemProperty Name=”iprop”/>
    <xc:DataGridItemProperty Name=”IntProp”
    ValuePath=”subProp.intProp”
    DataType=”{x:Type s:Int32}”/>
    </xc:DataGridCollectionViewSource.ItemProperties>
    </xc:DataGridCollectionViewSource>
    </Window.Resources>
    <Grid>
    <Grid.RowDefinitions>
    <RowDefinition Height=”Auto”/>
    <RowDefinition/>
    </Grid.RowDefinitions>
    <xc:DataGridControl x:Name=”grdTest” Grid.Row=”1″
    ItemsSource=”{Binding Source={StaticResource viewSource}, Path=View}”/>
    </Grid>
    </Window>

    and the simple classes I’m trying to display

    public class SubData
    {
    public string stringProp { get; set; }

    public int intProp { get; set; } S

    Imported from legacy forums. Posted by Colin (had 3447 views)

    Xceed Support
    Member
    Post count: 5658

    This issue is already known and a fix for it should be present in the next service release.

    Imported from legacy forums. Posted by Marcus [Xceed] (had 367 views)

    User (Old forums)
    Member
    Post count: 23064

    Do you have an approximate timeframe for the service release that will fix this problem. I am encountering the exact same exception with the same stack trace.

    Thanks

    Imported from legacy forums. Posted by m_d_blake (had 393 views)

    Xceed Support
    Member
    Post count: 5658

    A service pack has been released that should correct this error. Can you download it to see if it corrects the exception you are getting?

    Imported from legacy forums. Posted by Jenny [Xceed] (had 523 views)

    User (Old forums)
    Member
    Post count: 23064

    It did not solve my problem, although my scenario may have more to do with what I’m trying to do with xmldataprovider as the source to DataGridCollectionViewSource. I’ve created a new thread with an example of that particular problem, so I’m going to assume for now that my problem is not the same as that fixed by the service pack.

    Thanks – Mitch

    Imported from legacy forums. Posted by m_d_blake (had 4514 views)

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.