Hi,
i have a really strange problem with the gridview and i can't figure out what the exact problem ist. my scenario: i have a usercontrol with several other controls, a combobox and a gridview. the gridview contains several columns: text-, checkboxes- and one combobox-column. the deal is when i'm selecting a value in the combobox OUTSIDE the grid, the combobox INSIDE should be updated. which works pretty good - exept for one thing. when i load the data to the grid, change 1 cell in the grid, and then select the combobox outside, i get following exception:
________________________________________________________________________________________
System.FormatException was unhandled by user code
Message="GUID muss 32 Ziffern mit 4 Bindestrichen enthalten (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)."
Source="System"
StackTrace:
bei System.ComponentModel.ReflectPropertyDescriptor.SetValue(Object component, Object value)
bei Telerik.Windows.Data.ItemPropertyInfoExtensions.SetValue(ItemPropertyInfo itemProperty, Object item, Object value)
bei Telerik.Windows.Controls.GridView.EditContext.ReturnOldValuesToRow(GridViewColumnCollection columns, Dictionary`2 oldValues, Object dataItem)
bei Telerik.Windows.Controls.GridView.EditContext.CancelRowEdit(GridViewRow gridViewRow)
bei Telerik.Windows.Controls.GridView.EditContext.CancelEdit(GridViewEditingUnit editingUnit)
bei Telerik.Windows.Controls.GridView.GridViewDataControl.CancelEdit(GridViewEditingUnit editingUnit)
bei Telerik.Windows.Controls.GridView.GridViewDataControl.CancelEdit()
bei Telerik.Windows.Controls.GridView.GridViewDataControl.ItemsSourceChanged(Boolean sourceChanged)
bei Telerik.Windows.Controls.GridView.GridViewDataControl.OnItemsSourceChanged(Object oldValue, Object newValue)
bei Telerik.Windows.Controls.DataControl.OnItemsSourcePropertyChanged(DependencyObject origin, DependencyPropertyChangedEventArgs args)
bei System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
bei System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
bei System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
bei System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, OperationType operationType)
bei System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, OperationType operationType, Boolean isInternal)
bei System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
bei Telerik.Windows.Controls.DataControl.set_ItemsSource(Object value)
bei Hsg.Baxter.Cpe.BaxterWPFClient.Pages.Subpages.AssayDialog.PlateLayout_Changed(Object sender, SelectionChangedEventArgs e) in C:\Users\kogmon.HS\Desktop\TFS_Baxter\CPE_MAIN\BaxterWPFClient\Pages\Subpages\AssayDialog.xaml.cs:Zeile 1796.
bei System.Windows.Controls.SelectionChangedEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
bei System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
bei System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
bei System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
bei System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
bei System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
bei System.Windows.Controls.ComboBox.OnSelectionChanged(SelectionChangedEventArgs e)
bei System.Windows.Controls.Primitives.Selector.InvokeSelectionChanged(List`1 unselectedItems, List`1 selectedItems)
bei System.Windows.Controls.Primitives.Selector.SelectionChanger.End()
bei System.Windows.Controls.Primitives.Selector.SelectionChanger.SelectJustThisItem(Object item, Boolean assumeInItemsCollection)
bei System.Windows.Controls.ComboBox.NotifyComboBoxItemMouseUp(ComboBoxItem comboBoxItem)
bei System.Windows.Controls.ComboBoxItem.OnMouseLeftButtonUp(MouseButtonEventArgs e)
bei System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
bei System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
bei System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
bei System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
bei System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
bei System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
bei System.Windows.UIElement.CrackMouseButtonEventAndReRaiseEvent(DependencyObject sender, MouseButtonEventArgs e)
bei System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
bei System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
bei System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
bei System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
bei System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
bei System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
bei System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
bei System.Windows.Input.InputManager.ProcessStagingArea()
bei System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
bei System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
bei System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
bei System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
bei System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
bei MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
bei MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
bei System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
InnerException:
___________________________________________________________________________________________
if i first load the data, then select any value from the combobox and change the values in the grid after everything works fine.
i have tried to "delete" the existing itemsource by setting grid.ItemSource = null before rebinding the changed data but this also provides the same exception. any ideas what i can change?
thx in advance
i have a really strange problem with the gridview and i can't figure out what the exact problem ist. my scenario: i have a usercontrol with several other controls, a combobox and a gridview. the gridview contains several columns: text-, checkboxes- and one combobox-column. the deal is when i'm selecting a value in the combobox OUTSIDE the grid, the combobox INSIDE should be updated. which works pretty good - exept for one thing. when i load the data to the grid, change 1 cell in the grid, and then select the combobox outside, i get following exception:
________________________________________________________________________________________
System.FormatException was unhandled by user code
Message="GUID muss 32 Ziffern mit 4 Bindestrichen enthalten (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)."
Source="System"
StackTrace:
bei System.ComponentModel.ReflectPropertyDescriptor.SetValue(Object component, Object value)
bei Telerik.Windows.Data.ItemPropertyInfoExtensions.SetValue(ItemPropertyInfo itemProperty, Object item, Object value)
bei Telerik.Windows.Controls.GridView.EditContext.ReturnOldValuesToRow(GridViewColumnCollection columns, Dictionary`2 oldValues, Object dataItem)
bei Telerik.Windows.Controls.GridView.EditContext.CancelRowEdit(GridViewRow gridViewRow)
bei Telerik.Windows.Controls.GridView.EditContext.CancelEdit(GridViewEditingUnit editingUnit)
bei Telerik.Windows.Controls.GridView.GridViewDataControl.CancelEdit(GridViewEditingUnit editingUnit)
bei Telerik.Windows.Controls.GridView.GridViewDataControl.CancelEdit()
bei Telerik.Windows.Controls.GridView.GridViewDataControl.ItemsSourceChanged(Boolean sourceChanged)
bei Telerik.Windows.Controls.GridView.GridViewDataControl.OnItemsSourceChanged(Object oldValue, Object newValue)
bei Telerik.Windows.Controls.DataControl.OnItemsSourcePropertyChanged(DependencyObject origin, DependencyPropertyChangedEventArgs args)
bei System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
bei System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
bei System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
bei System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, OperationType operationType)
bei System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, OperationType operationType, Boolean isInternal)
bei System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
bei Telerik.Windows.Controls.DataControl.set_ItemsSource(Object value)
bei Hsg.Baxter.Cpe.BaxterWPFClient.Pages.Subpages.AssayDialog.PlateLayout_Changed(Object sender, SelectionChangedEventArgs e) in C:\Users\kogmon.HS\Desktop\TFS_Baxter\CPE_MAIN\BaxterWPFClient\Pages\Subpages\AssayDialog.xaml.cs:Zeile 1796.
bei System.Windows.Controls.SelectionChangedEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
bei System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
bei System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
bei System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
bei System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
bei System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
bei System.Windows.Controls.ComboBox.OnSelectionChanged(SelectionChangedEventArgs e)
bei System.Windows.Controls.Primitives.Selector.InvokeSelectionChanged(List`1 unselectedItems, List`1 selectedItems)
bei System.Windows.Controls.Primitives.Selector.SelectionChanger.End()
bei System.Windows.Controls.Primitives.Selector.SelectionChanger.SelectJustThisItem(Object item, Boolean assumeInItemsCollection)
bei System.Windows.Controls.ComboBox.NotifyComboBoxItemMouseUp(ComboBoxItem comboBoxItem)
bei System.Windows.Controls.ComboBoxItem.OnMouseLeftButtonUp(MouseButtonEventArgs e)
bei System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
bei System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
bei System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
bei System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
bei System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
bei System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
bei System.Windows.UIElement.CrackMouseButtonEventAndReRaiseEvent(DependencyObject sender, MouseButtonEventArgs e)
bei System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
bei System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
bei System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
bei System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
bei System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
bei System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
bei System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
bei System.Windows.Input.InputManager.ProcessStagingArea()
bei System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
bei System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
bei System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
bei System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
bei System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
bei MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
bei MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
bei System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
InnerException:
___________________________________________________________________________________________
if i first load the data, then select any value from the combobox and change the values in the grid after everything works fine.
i have tried to "delete" the existing itemsource by setting grid.ItemSource = null before rebinding the changed data but this also provides the same exception. any ideas what i can change?
thx in advance