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

Grid Issue

1 Answer 48 Views
GridView
This is a migrated thread and some comments may be shown as answers.
dCODE
Top achievements
Rank 1
dCODE asked on 03 Mar 2010, 09:04 AM
What does the error mean, my grid is working fine. and when i click multiple clicks in a cell it throws error in IValue converter, Convertback function
here

 

public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)

 

{

 

 

throw new NotImplementedException();

 

}

how to resolve this.

 



System.NotImplementedException was unhandled
  Message="The method or operation is not implemented."
  Source="Grid Issue"
  StackTrace:
       at Grid_Issue.ConvertReportType.ConvertBack(Object value, Type targetType, Object parameter, CultureInfo culture) in D:\Grid Issue\Grid Issue\ConvertReportType.cs:line 109
       at System.Windows.Data.BindingExpression.ConvertProposedValue(Object value)
       at System.Windows.Data.BindingExpressionBase.UpdateValue()
       at Telerik.Windows.Controls.GridViewBoundColumnBase.UpdateBindingBaseSource(BindingExpression bindingBase, DependencyObject source) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Columns\GridViewBoundColumnBase.cs:line 844
       at Telerik.Windows.Controls.GridViewBoundColumnBase.UpdateSourceWithEditorValue(GridViewCell gridViewCell) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Columns\GridViewBoundColumnBase.cs:line 792
       at Telerik.Windows.Controls.GridView.GridViewCell.UpdateSourceWithEditorValue() in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Cells\GridViewCell.cs:line 1223
       at Telerik.Windows.Controls.GridView.EditContext.ValidateCell(GridViewCell cell) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Editing\EditContext.cs:line 227
       at Telerik.Windows.Controls.GridView.EditContext.PerformCellValidation(GridViewCell cell) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Editing\EditContext.cs:line 211
       at Telerik.Windows.Controls.GridView.EditContext.CommitCellEdit(GridViewCell currentCell, Boolean isLeavingRow) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Editing\EditContext.cs:line 73
       at Telerik.Windows.Controls.GridView.EditContext.CanCellBecomeCurrent(GridViewCell cell) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Editing\EditContext.cs:line 333
       at Telerik.Windows.Controls.GridView.GridViewCell.CanCellBecomeCurrent() in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Cells\GridViewCell.cs:line 119
       at Telerik.Windows.Controls.GridView.GridViewCell.OnCoerceIsCurrent(DependencyObject target, Object baseValue) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Cells\GridViewCell.cs:line 109
       at System.Windows.DependencyObject.ProcessCoerceValue(DependencyProperty dp, PropertyMetadata metadata, EntryIndex& entryIndex, Int32& targetIndex, EffectiveValueEntry& newEntry, EffectiveValueEntry& oldEntry, Object& oldValue, Object baseValue, CoerceValueCallback coerceValueCallback, Boolean coerceWithDeferredReference, Boolean skipBaseValueChecks)
       at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, OperationType operationType)
       at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, OperationType operationType, Boolean isInternal)
       at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
       at Telerik.Windows.Controls.GridView.GridViewCell.set_IsCurrent(Boolean value) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Cells\GridViewCell.cs:line 310
       at Telerik.Windows.Controls.GridView.EditContext.OnCellMouseDown(GridViewCell cell) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Editing\EditContext.cs:line 327
       at Telerik.Windows.Controls.GridView.GridViewCell.OnMouseLeftButtonDown(MouseButtonEventArgs e) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Cells\GridViewCell.cs:line 429
       at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       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.OnMouseDownThunk(Object sender, MouseButtonEventArgs e)
       at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       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.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter)
       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.TranslateAndDispatchMessage(MSG& msg)
       at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
       at System.Windows.Application.RunInternal(Window window)
       at Grid_Issue.App.Main() in D:\Grid Issue\Grid Issue\obj\Debug\App.g.cs:line 0
       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException:

1 Answer, 1 is accepted

Sort by
0
Milan
Telerik team
answered on 03 Mar 2010, 12:42 PM
Hi dCODE,

Whenever you try to commit a value and you are using a TwoWay binding with IValueConverter applied RadGridView will try to run the ConvertBack method of the converter. In your scenario the converter throws exception when ConvertBack is called. One way to deal with the problem is to change the ConvertBack method:

public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 
  
{
  
return value;
  
}

I am not sure if this implementation will be sufficient for your scenario. Here you could find more information about IValueConverter.


Kind regards,
Milan
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.
Tags
GridView
Asked by
dCODE
Top achievements
Rank 1
Answers by
Milan
Telerik team
Share this question
or