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

Scrolling RadGridView containing many RadRichTextBox controls crashes

1 Answer 74 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Joel
Top achievements
Rank 1
Joel asked on 07 Oct 2011, 03:54 PM
Hi,

I have a WPF form which has a RadGridView on it.  In this RadGridView there's a RadRichTextBox on every row.  Everything works fine when the RadRichTextBox's height is set to 30 but as soon as I change the height to a bigger number (i.e. 90) and scroll the rad grid I get this exception:

Object reference not set to an instance of an object.

The Stack trace is this:
   at Telerik.Windows.Documents.Layout.LayoutElement.SetParent(LayoutElement newParent) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Documents\Layout\LayoutElement.cs:line 691
   at Telerik.Windows.Documents.Layout.LayoutBox.get_Parent() in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Documents\Layout\LayoutBox.cs:line 255
   at Telerik.Windows.Documents.UI.UILayer.GetProperClipping(LayoutBox box) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Documents\UI\UILayer.cs:line 364
   at Telerik.Windows.Documents.UI.UILayer.ArrangeChildren() in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Documents\UI\UILayer.cs:line 336
   at Telerik.Windows.Documents.UI.DocumentWebLayoutPresenter.ArrangeChildren(UIElement uiElement, RectangleF visibleDocumentRect) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Documents\UI\DocumentWebLayoutPresenter.cs:line 952
   at Telerik.Windows.Documents.UI.DocumentWebLayoutPresenter.ArrangeOverride(Size finalSize) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Documents\UI\DocumentWebLayoutPresenter.cs:line 922
   at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
   at System.Windows.UIElement.Arrange(Rect finalRect)
   at System.Windows.ContextLayoutManager.UpdateLayout()
   at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
   at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
   at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
   at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
   at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
   at System.Threading.ExecutionContext.runTryCode(Object userData)
   at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(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, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   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()
   at WPFApp.App.Main() in C:\DevProjectsAPCA2\ABS\Main\Source\ABS-WPF\Source\WPFApp\obj\x86\Debug\App.g.cs:line 0
   at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
   at System.AppDomain.nExecuteAssembly(RuntimeAssembly assembly, String[] args)
   at System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel)
   at System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly()
   at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData)
   at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext)
   at System.Activator.CreateInstance(ActivationContext activationContext)
   at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

Has anyone seen this?

Thanks,

-- Joel

1 Answer, 1 is accepted

Sort by
0
Iva Toteva
Telerik team
answered on 13 Oct 2011, 10:42 AM
Hi Joel,

We were not able to reproduce the issue on our end using the latest version of the control following the most common approach to binding the content of RadRichTextBox - using data providers or creating a control with a RichText dependency property as done in the demo in this forum post.
Now that you have opened a support ticket and attached a sample project showing your custom solution, we were able to detect the problem. We will get back to you on this topic in the ticket thread.

Kind regards,
Iva
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
RichTextBox
Asked by
Joel
Top achievements
Rank 1
Answers by
Iva Toteva
Telerik team
Share this question
or