We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Cannot set DataRow as Data, Try setting DataRowView

Thread ID:

Created:

Updated:

Platform:

Replies:

106832 Jan 28,2013 01:49 PM UTC Feb 5,2013 04:31 AM UTC WPF 1
loading
Tags: GridControl
Michal
Asked On January 28, 2013 01:49 PM UTC

Hi,

 I have a grid bounded to the datatable. There is a new row enabled.
 In first column I have a textbox in second one there is a checkbox.
 When I write in the textbox and hit enter, everything is fine. But I want to fill the checkbox. If I click on the cell and then on the textbox, it's fine also. But when I directly click on the checkbox I have the subjects exception. I have seen that you make the direct checking is the Data property typeof DataRow. But how can I do it manually. I have to admit that this is the worst grid control I have ever seen.

System.InvalidOperationException: Cannot set DataRow as Data, Try setting DataRowView
   at Syncfusion.Windows.Data.RecordEntry.set_Data(Object value)
   at Syncfusion.Windows.Data.RecordEntry..ctor(NodeEntry parent, Int32 level, Object data)
   at Syncfusion.Windows.Controls.Grid.GridDataRecord..ctor(Object data, GridDataTable parentTable)
   at Syncfusion.Windows.Controls.Grid.GridDataTableModel.<CreateCollectionViewAdv>b__7c(Object rec, ICollectionViewAdv parentView)
   at Syncfusion.Windows.Controls.Grid.GridDataTableCollectionViewWrapper.CreateRecordEntry(Object data)
   at Syncfusion.Windows.Data.EnumerableRecordsWrapper.CreateRecord(Object data)
   at Syncfusion.Windows.Data.EnumerableRecordsWrapper.CreateRecordEntry(Object data)
   at Syncfusion.Windows.Controls.Grid.GridCellDataBoundTemplateRenderer.ProvideDataWrapperInstance(GridDataCellBoundWrapper wrapperInstance, GridRenderStyleInfo style)
   at Syncfusion.Windows.Controls.Grid.GridCellDataBoundTemplateRenderer.OnInitializeContent(GridCell uiElement, GridRenderStyleInfo style)
   at Syncfusion.Windows.Controls.Grid.GridVirtualizingCellRendererBase`1.InitializeContent(T uiElement, GridRenderStyleInfo cellInfo)
   at Syncfusion.Windows.Controls.Grid.GridVirtualizingCellRenderer`1.RefreshContent()
   at Syncfusion.Windows.Controls.Grid.GridCurrentCell.CreateCurrentCellUIElements()
   at Syncfusion.Windows.Controls.Grid.GridCurrentCell.BeginEdit(Boolean focusCellUIElement)
   at Syncfusion.Windows.Controls.Grid.GridCurrentCell.BeginEditHelper(GridActivateCurrentCellOptions activateOptions)
   at Syncfusion.Windows.Controls.Grid.GridCurrentCell.Activate(RowColumnIndex cellRowColumnIndex, GridActivateCurrentCellOptions activateOptions)
   at Syncfusion.Windows.Controls.Grid.GridCurrentCell.Activate(Int32 rowIndex, Int32 columnIndex, GridActivateCurrentCellOptions activateOptions)
   at Syncfusion.Windows.Controls.Grid.GridCurrentCell.MoveTo(Int32 rowIndex, Int32 columnIndex, GridActivateCurrentCellOptions activateOptions)
   at Syncfusion.Windows.Controls.Grid.GridCellRendererBase.OnPreviewGotKeyboardFocus(Object sender, RoutedEventArgs e)
   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.KeyboardDevice.TryChangeFocus(DependencyObject newFocus, IKeyboardInputProvider keyboardInputProvider, Boolean askOld, Boolean askNew, Boolean forceToNullIfFailed)
   at System.Windows.Input.KeyboardDevice.Focus(DependencyObject focus, Boolean askOld, Boolean askNew, Boolean forceToNullIfFailed)
   at System.Windows.Input.KeyboardDevice.Focus(IInputElement element)
   at System.Windows.UIElement.Focus()
   at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonDown(MouseButtonEventArgs e)
   at System.Windows.UIElement.OnMouseLeftButtonDownThunk(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.OnMouseDownThunk(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, IntA first chance exception of type 'System.InvalidOperationException' occurred in Syncfusion.Linq.Base.dll


Rajasekar G [Syncfusion]
Replied On February 5, 2013 04:31 AM UTC

Hi Michal, 

Sorry for the inconvenience caused. We have tested the reported issue in different scenario but we are unable to reproduce the issue. Could you please check the below sample?

Sample: GridDataControlSample.zip 

We suspect you are using our grid in some other scenario, So If possible could you please modify our sample and revert us with replication procedure, that would be very helpful to resolve your problem earlier. 

Please let know if you have any queries. 

Thanks,

Rajasekar


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;