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>
Hello Parvez,
Thank you for your post. I have been looking into your issue and I have not be able to reproduce it. I have created a sample application(DataGridFieldMovingIssue.zip) in order to test your scenario but it seems that I am missing something. Would you please try to modify it or attach your own sample application where this exception appears ? Also I would like to know your assemblies’ version like 11.2.20112.1012, the operation system and the version of your Visual Studio.
Looking forward to hearing from you.
Hi Yanko,
Thanks for looking into this issue. I am using version 11.2.20112.2125. The problem happens when I have "AutoGenerateFields=True" and the columns are dynamically generated.
I will try to modify the solution and send it to you. But meanwhile if u can replicate this with dynamic column creation, that would be extremely helpful. This has become a top priority issue for us. Are there any other recommendations that I can look at to resolve this issue(even a workaround would be great).
Thanks,
Thanks for the follow-up and update Yanko. Appreciate your prompt follow-up.
For now, we had made custom code to handle this. I would love to see this fixed as part of package and can verify the results once the SR is available.
Regards
Parvez.
Which service release is this included in because we are having the same issues?
Paverez, can you tell me what code changes you made to handle this?
Sorry misspelled your name Parvez :)
Hello,
I have been looking into your question and the fix for this issue is part of the latest Service Releases for 13.1 and 13.2.
You could download the latest Service Release going to our web site -> Account -> Select your product -> Service Release tab.
Let me know, if you need any further assistance on this matter.