Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
430
xamDataGrid: Moving columns causes app crash
posted

Hi,

We are using xamDataGrid v 11.2 in our WPF application. When we move columns in the grid, it causes app crash. My obervation is that it happens only when the columns are dynamically created in the grid. I have looked at couple issues that others have reported with similar observations and changed the suggested solutions(FilterUIType), but without any luck.  The trace message is shown as below. I have also attached the FieldLayoutSettings and FieldSettings for your information. Any suggestions would be of great help.

 

HandlingInstanceID: fe1c4f5e-4622-4592-9b17-d4c554ac56ca

An exception of type 'System.InvalidOperationException' occurred and was caught.

 --------------------------------------------------------------------------------

 02/06/2013 15:33:04 Message : Source:mscorlib Stacktrace:    at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)    at System.Collections.Generic.List`1.Enumerator.MoveNextRare()    at System.Collections.Generic.List`1.Enumerator.MoveNext()    at Infragistics.Controls.Layouts.Primitives.GridBagLayoutManager.ResizeManager.CloneLayoutManagerHelper(GridBagLayoutManager source)    at Infragistics.Controls.Layouts.Primitives.GridBagLayoutManager.ResizeManager..ctor(GridBagLayoutManager layoutManager, ILayoutContainer layoutContainer, Object containerContext, Boolean autoFitWidth, Boolean autoFitHeight)    at Infragistics.Windows.DataPresenter.DataPresenterBase.Infragistics.Windows.Resizing.IResizeHost.InitializeResizeConstraints(FrameworkElement resizeArea, FrameworkElement resizableItem, ResizeConstraints constraints)    at Infragistics.Windows.DataPresenter.DataPresenterBase.Infragistics.Windows.Resizing.IResizeHost.CanResize(FrameworkElement resizableItem, Boolean resizeInXAxis)    at Infragistics.Windows.Resizing.ResizeController.GetElementToResize(FrameworkElement element, MouseDevice mouseDevice, Nullable`1& processWidth)    at Infragistics.Windows.Resizing.ResizeController.OnQueryCursor(Object sender, QueryCursorEventArgs e)    at System.Windows.Input.QueryCursorEventArgs.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(DependencyObject sender, RoutedEventArgs args)    at System.Windows.UIElement.RaiseTrustedEvent(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.MouseDevice.UpdateCursorPrivate()    at System.Windows.Input.MouseDevice.PostProcessInput(Object sender, ProcessInputEventArgs e)    at System.Windows.Input.InputManager.RaiseProcessInputEventHandlers(ProcessInputEventHandler postProcessInput, ProcessInputEventArgs processInputEventArgs)    at System.Windows.Input.InputManager.ProcessStagingArea()    at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)    at System.Windows.Input.MouseDevice.Synchronize()    at System.Windows.Input.MouseDevice.ChangeMouseCapture(IInputElement mouseCapture, IMouseInputProvider providerCapture, CaptureMode captureMode, Int32 timestamp)    at System.Windows.Input.MouseDevice.PreNotifyInput(Object sender, NotifyInputEventArgs e)    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, WindowMessage 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, Int32 numArgs)    at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

 

<ig:XamDataGrid.FieldSettings>

<ig:FieldSettings LabelTextWrapping="Wrap" AllowRecordFiltering="True" CellClickAction="SelectCell" AllowGroupBy="False" AllowFixing="NearOrFar" AllowHiding="Always" CellValuePresenterStyle="{DynamicResource CellValuePresenterStyle}"  AllowResize="True" LabelClickAction="SortByMultipleFieldsTriState">

</ig:FieldSettings>

</ig:XamDataGrid.FieldSettings>

           

<ig:XamDataGrid.FieldLayoutSettings>

 <ig:FieldLayoutSettings AutoGenerateFields="True" FilterUIType="FilterRecord" AllowDelete="False" AllowClipboardOperations="All" SelectionTypeCell="Default" AllowRecordFixing="TopOrBottom" HeaderPrefixAreaDisplayMode="FieldChooserButton" AutoArrangeCells="LeftToRight" DataRecordSizingMode="Fixed" AutoFitMode="ExtendLastField"/></ig:XamDataGrid.FieldLayoutSettings>