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
50
Exception when changing the "Field" Value in the CustomFilterSelectionControl
posted

Situation:
We are using XamDataGrid on which we have set the CrossFieldRecordFilter.
we have set the "HeaderPrefixAreaDisplayMode" attribute to "Menu" and the "HeaderPrefixAreaMenuOptions" to "ShowCrossFieldRecordFiltersDialog". This results in having a menu un the upper left corner of the XamDataGrid with one menu item to show the plain vanilla CustomFilterSelectionControl.

When the standard CustomFilterSelectionControl opens, we try to change value of any of the existing "Field" entries. When we do this, we get the exception listed below.

  • If we change the value of the Operator or Operand field on any entry, we do not get any problems.
  • If we add a condition anywhere in the control, we are now able to edit the Field value without exception.
  • Event tough we get an exception, the value of the field is set in the CrossFieldRecordFilter in the XamDataGrid.

The goal is not to get an exception as we do not really have the means to sink the exception as we are not the one spawning the dialog.
The problem seems to be located in the CustomFilterSelectionControl.EditFieldValue method.

Exception listing:

Exception has been thrown by the target of an invocation.

Exception has been thrown by the target of an invocation.

Object reference not set to an instance of an object.
____________________________________________________
System.Reflection.TargetInvocationException

Message:
Exception has been thrown by the target of an invocation.

Stack Trace:
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   at System.Windows.RoutedEventArgs.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.RaiseEvent(RoutedEventArgs e)
   at Infragistics.Windows.Editors.ValueEditor.RaiseEventHelper(RoutedEventArgs args)
   at Infragistics.Windows.Editors.ValueEditor.OnEditModeEnded(EditModeEndedEventArgs args)
   at Infragistics.Windows.Editors.ValueEditor.RaiseEditModeEnded(EditModeEndedEventArgs args)
   at Infragistics.Windows.Editors.ValueEditor.EndEditMode(Boolean acceptChanges, Boolean force)
   at Infragistics.Windows.DataPresenter.Cell.EndEditMode(Boolean acceptChanges, Boolean forceExit)
   at Infragistics.Windows.DataPresenter.DataPresenterBase.ExecuteCommandImpl(ExecuteCommandInfo commandInfo, Boolean raiseEvents)
   at Infragistics.Windows.DataPresenter.CustomFilterSelectionControl.OnComboSelectionChanged(Object sender, RoutedPropertyChangedEventArgs`1 e)
   at System.Windows.RoutedPropertyChangedEventArgs`1.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.RaiseEvent(RoutedEventArgs e)
   at Infragistics.Windows.Editors.ValueEditor.RaiseEventHelper(RoutedEventArgs args)
   at Infragistics.Windows.Editors.ValueEditor.EndSyncValueProperties()
   at Infragistics.Windows.Editors.XamComboEditor.OnValueChanged_SyncProperties(ValueChangeSource source, Object value, Boolean calledFromSyncValuePropertiesOverride)
   at Infragistics.Windows.Editors.XamComboEditor.OnComboBox_SelectionChanged(Object sender, SelectionChangedEventArgs e)
   at System.Windows.Controls.SelectionChangedEventArgs.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.RaiseEvent(RoutedEventArgs e)
   at System.Windows.Controls.ComboBox.OnSelectionChanged(SelectionChangedEventArgs e)
   at System.Windows.Controls.Primitives.Selector.InvokeSelectionChanged(List`1 unselectedInfos, List`1 selectedInfos)
   at System.Windows.Controls.Primitives.Selector.SelectionChanger.End()
   at System.Windows.Controls.Primitives.Selector.SelectionChanger.SelectJustThisItem(ItemInfo info, Boolean assumeInItemsCollection)
   at System.Windows.Controls.ComboBox.NotifyComboBoxItemMouseUp(ComboBoxItem comboBoxItem)
   at System.Windows.Controls.ComboBoxItem.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(DependencyObject sender, 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(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.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 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

TargetSite:
System.Object InvokeMethod(System.Object, System.Object[], System.Signature, Boolean)

Source:
mscorlib

HResult:
-2146232828
____________________________________________________
System.Reflection.TargetInvocationException

Message:
Exception has been thrown by the target of an invocation.

Stack Trace:
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   at System.Windows.RoutedEventArgs.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.RaiseEvent(RoutedEventArgs e)
   at Infragistics.Windows.DataPresenter.DataPresenterBase.RaiseEventHelper(RoutedEventArgs args)
   at Infragistics.Windows.DataPresenter.DataPresenterBase.OnEditModeEnded(EditModeEndedEventArgs args)
   at Infragistics.Windows.DataPresenter.DataPresenterBase.RaiseEditModeEnded(EditModeEndedEventArgs args)
   at Infragistics.Windows.DataPresenter.CellValuePresenter.OnEditModeEnded(EditModeEndedEventArgs e)
   at Infragistics.Windows.Editors.ValuePresenter.ClassHandler_EditModeEnded(Object sender, EditModeEndedEventArgs e)

TargetSite:
System.Object InvokeMethod(System.Object, System.Object[], System.Signature, Boolean)

Source:
mscorlib

HResult:
-2146232828
____________________________________________________
System.NullReferenceException

Message:
Object reference not set to an instance of an object.

Stack Trace:
   at Infragistics.Windows.DataPresenter.CustomFilterSelectionControl.EditFieldValue(Cell cell)
   at Infragistics.Windows.DataPresenter.CustomFilterSelectionControl.OnConditionsGridEditModeEnded(Object sender, EditModeEndedEventArgs e)

TargetSite:
Void EditFieldValue(Infragistics.Windows.DataPresenter.Cell)

Source:
InfragisticsWPF4.DataPresenter.v17.2

HResult:
-2147467261

Parents Reply Children