This is a migrated thread and some comments may be shown as answers.

exception on rebind itemsource

6 Answers 104 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Monika Kogler
Top achievements
Rank 1
Monika Kogler asked on 17 Sep 2010, 11:38 AM
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

6 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 17 Sep 2010, 12:22 PM
Hi Monika Kogler,

In order to provide you with an appropriate solution, I would need a bit more information about your application. Please pose as much relevant code as possible or better - send us a sample project reproducing the issue.

 
Greetings,
Maya
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Monika Kogler
Top achievements
Rank 1
answered on 20 Sep 2010, 02:06 PM
Hi Maya,

i have tried to open a new bug report but it's not working (both kinds are not working). Is there any other way to provide the sample-project to you?

Regards, Monika
0
Maya
Telerik team
answered on 20 Sep 2010, 02:18 PM
Hi Monika Kogler,

You may send us your sample project via support ticket. Thank you for your cooperation.
 

All the best,
Maya
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Monika Kogler
Top achievements
Rank 1
answered on 20 Sep 2010, 02:29 PM
your support is not working for me! the PITS and any kind of bugreport is not working: it takes a long time, and then an exception occurs saying that the object was not found in row 1 column 1 (???). i have tried this about 7 times now. so is there any other way to send you the example?
0
Maya
Telerik team
answered on 20 Sep 2010, 03:39 PM
Hello Monika Kogler,

There should be no reason for you not to able to send us a support ticket. The only possible cause for the moment would be if you are trying to attach a file bigger than 20MB as this would be beyond the limits. Please try again after restarting your browser and let us know if you still have any troubles with that.
 

Regards,
Maya
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Monika Kogler
Top achievements
Rank 1
answered on 20 Sep 2010, 03:58 PM
in IE it finally works (Mozilla is still not working!). The ticket number is 349707.
thx in advance
Tags
GridView
Asked by
Monika Kogler
Top achievements
Rank 1
Answers by
Maya
Telerik team
Monika Kogler
Top achievements
Rank 1
Share this question
or