I have a simple app with a docking panel and a pane with a data grid in it.
I can bind the data grid to a data source and the data appears OK. The fields are generated automatically.
If I click on a data cell I can edit it, only if the underlying field is a string. If i have a data source with int, float, or datetime columns, then as soon as I click on a data cell to edit it, the app crashes with the following message:
Error HRESULT E_FAIL has been returned from a call to a COM component.System.Runtime.InteropServices.COMException was unhandled Message="Error HRESULT E_FAIL has been returned from a call to a COM component." Source="WindowsBase" ErrorCode=-2147467259 StackTrace: at MS.Win32.UnsafeNativeMethods.ITfSource.AdviseSink(Guid& riid, Object obj, Int32& cookie) at System.Windows.Input.TextServicesCompartment.AdviseNotifySink(ITfCompartmentEventSink sink) at System.Windows.Input.InputMethod.InitializeCompartmentEventSink() at System.Windows.Input.InputMethod.add_StateChanged(InputMethodStateChangedEventHandler value) at Infragistics.Windows.Editors.EditInfo.HookUnhookInputMethodHelper(Boolean hook) at Infragistics.Windows.Editors.XamMaskedEditor.ProcessIsBeingEditedAndFocusedChanged(Boolean focused) at Infragistics.Windows.Editors.XamMaskedEditor.OnIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs e) at System.Windows.UIElement.RaiseIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs args) at System.Windows.FocusWithinProperty.FireNotifications(UIElement uie, ContentElement ce, UIElement3D uie3D, Boolean oldValue) at System.Windows.ReverseInheritProperty.FirePropertyChangeInAncestry(DependencyObject element, Boolean oldValue, DeferredElementTreeState treeState) at System.Windows.ReverseInheritProperty.FirePropertyChangeInAncestry(DependencyObject element, Boolean oldValue, DeferredElementTreeState treeState) at System.Windows.ReverseInheritProperty.FirePropertyChangeInAncestry(DependencyObject element, Boolean oldValue, DeferredElementTreeState treeState) at System.Windows.ReverseInheritProperty.FirePropertyChangeInAncestry(DependencyObject element, Boolean oldValue, DeferredElementTreeState treeState) at System.Windows.ReverseInheritProperty.OnOriginValueChanged(DependencyObject oldOrigin, DependencyObject newOrigin, DeferredElementTreeState& oldTreeState) at System.Windows.Input.KeyboardDevice.ChangeFocus(DependencyObject focus, Int32 timestamp) at System.Windows.Input.KeyboardDevice.TryChangeFocus(DependencyObject newFocus, IKeyboardInputProvider keyboardInputProvider, Boolean askOld, Boolean askNew, Boolean forceToNullIfFailed) at System.Windows.Input.KeyboardDevice.Focus(DependencyObject focus, Boolean askOld, Boolean askNew) at System.Windows.Input.KeyboardDevice.Focus(IInputElement element) at System.Windows.UIElement.Focus() at System.Windows.Input.KeyboardNavigation.Navigate(DependencyObject currentElement, TraversalRequest request, ModifierKeys modifierKeys, DependencyObject firstElement) at System.Windows.FrameworkElement.MoveFocus(TraversalRequest request) at Infragistics.Windows.Editors.ValueEditor.SetFocusToFocusSite() at Infragistics.Windows.Editors.ValueEditor.StartEditMode(Boolean takeFocus) at Infragistics.Windows.Editors.ValuePresenter.StartEditMode() at Infragistics.Windows.DataPresenter.CellValuePresenter.ActivateAndEnterEditMode() at Infragistics.Windows.DataPresenter.CellValuePresenter.ProcessPreviewMouseLeftButtonDown(MouseButtonEventArgs e) at Infragistics.Windows.Editors.ValuePresenter.OnPreviewMouseLeftButtonDown(MouseButtonEventArgs e) at System.Windows.UIElement.OnPreviewMouseLeftButtonDownThunk(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.CrackMouseButtonEventAndReRaiseEvent(DependencyObject sender, MouseButtonEventArgs e) at System.Windows.UIElement.OnPreviewMouseDownThunk(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.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.WrappedInvoke(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.RunDispatcher(Object ignore) at System.Windows.Application.RunInternal(Window window) at System.Windows.Application.Run(Window window) at System.Windows.Application.Run() ... InnerException:
i have been able to reproduce it simply with the following code:
public class DataItem { private int _val; public int Val { get { return _val; } set { _val = value; } } } /// <summary> /// Interaction logic for Window1.xaml /// </summary> public partial class Window1 : Window { public Window1() { InitializeComponent(); this.VehicleDG.DataItems.Add(new DataItem() { Val = 1 }); this.VehicleDG.DataItems.Add(new DataItem() { Val = 2 }); }}
<Window x:Class="TestApp.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:igWindows="http://infragistics.com/Windows" xmlns:igDock="http://infragistics.com/DockManager" xmlns:igDP="http://infragistics.com/DataPresenter" xmlns:s="clr-namespace:System;assembly=mscorlib" Width="Auto" Height="Auto" Background="#00FFFFFF" Loaded="Window_Loaded" > <Grid Margin="0,0,0,0"> <igDock:XamDockManager Theme="Aero"> <igDock:XamDockManager.Panes> <igDock:SplitPane igDock:XamDockManager.InitialLocation="DockedLeft"> <igDock:ContentPane x:Name="leftEdgeDock" Header="Vehicles"> <igDP:XamDataGrid Name="VehicleDG"> <igDP:XamDataGrid.FieldLayoutSettings> <igDP:FieldLayoutSettings AutoGenerateFields="True" /> </igDP:XamDataGrid.FieldLayoutSettings> </igDP:XamDataGrid> </igDock:ContentPane> </igDock:SplitPane> </igDock:XamDockManager.Panes> </igDock:XamDockManager> </Grid></Window>
If I change the definition of Val in my DataItem class to be a string rather than an int, it works fine.
Any ideas what I am doing wrong?
I am currently evaluating Net Advantage v9,2 and so am using a trial licence, I still have 18 usage days or 9 calendar weeks left. I don't know if this makes any difference. I'm using Vista, Visual Studio 2008 and .NET 3.5
I had this problem when run ccleaner on my pc. I fixed it with this:
http://www.sysprobs.com/language-bar-missing-vista-windows-7
Hello Raymond, Have you had any luck with finding solution to this problem. I am into the same situation.. only one customer is getting this error. It happens only leaving it open for some time.
Mark, did u find a solution to this problem? A customer from us has the same exception when he click's an XamEditor somewhere in the application. It was working for a while and suddenly it doesn't anymore. For now that customer is the only one having the problem, but it worries me.
I'm having his exact problem, but my Task Scheduler is running (Windows 7 x64) and working (I have a few nightly scheduled tasks that run every night without issues).
I will try to update the Language Toolbar settings to see if that has any effect.
I've fixed it. My Task Scheduler service wan't running.
Following your last suggestion about changing the IME I tried installing Japanese. It was only then that I noticed that the language tool bar wasn't being displayed. Not only was it not displayed but it was missing from the list of available tool bars.
Bizarrely however, it would appear fleetingly whenever I did anything to cause the screen to gray out and show the UAC dialog.
After much Googling, it turned out to be due to my Task Scheduler service not running !? Getting it running turned out to be another saga of Googling and registry editing but magically my Langauge Toolbar now appears and the crash I was getting no longer happens.
Now that the Task Scheduler service is running I was going to do a quick verification to see if my problem reappeared when I stopped it, but the options to stop the service are all disabled. I won't pursue this any further.
Thanks for putting me on the right track.