Exception while Scrolling

Posted by: krafth on 8 September 2017, 3:12 pm EST

  • Posted 8 September 2017, 3:12 pm EST

    Hello,

    VisualStudi0 2010, .net Framework 2.0, Spread for Windows Forms 7.0.2002.2008

    I have to display 600 rows in a spread. I add the first 96 Rows with
    m_fpSpread.Sheets[0].Rows.Add(...);
    and than I set the CellValues. When the user scrolls to the end I read the next 96 rows with the same functionality.

    Because auf speed issues I call suspendLayout before adding the rows and after it I call resumeLayout. When I scroll down by clicking the free space between the scroll down-button and the scrollbar-bar (see the attached image) I get an Exception with the Information as added below.

    Any suggestions?

    Best Regards

    Holger



    Exception Information:
    System.Transactions Critical: 0 : <TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Critical"><TraceIdentifier>http://msdn.microsoft.com/TraceCodes/System/ActivityTracing/2004/07/Reliability/Exception/Unhandled</TraceIdentifier><Description>Unhandled exception</Description><AppDomain>Uptime.vshost.exe</AppDomain><Exception><ExceptionType>System.NullReferenceException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType><Message>Object reference not set to an instance of an object.</Message><StackTrace>   at FarPoint.Win.Spread.FpScrollBar.OnMouseDown(MouseEventArgs e)
    at System.Windows.Forms.Control.WmMouseDown(Message&amp; m, MouseButtons button, Int32 clicks)
    at System.Windows.Forms.Control.WndProc(Message&amp; m)
    at FarPoint.Win.Spread.FpScrollBar.WndProc(Message&amp; m)
    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp; m)
    at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&amp; msg)
    at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
    at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
    at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
    at Uptime.Program.Main() in D:\projects\ASM\UptimePro\Uptime\Program.cs:line 430
    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()</StackTrace><ExceptionString>System.NullReferenceException: Object reference not set to an instance of an object.
    at FarPoint.Win.Spread.FpScrollBar.OnMouseDown(MouseEventArgs e)
    at System.Windows.Forms.Control.WmMouseDown(Message&amp; m, MouseButtons button, Int32 clicks)
    at System.Windows.Forms.Control.WndProc(Message&amp; m)
    at FarPoint.Win.Spread.FpScrollBar.WndProc(Message&amp; m)
    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp; m)
    at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&amp; msg)
    at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
    at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
    at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
    at Uptime.Program.Main() in D:\projects\ASM\UptimePro\Uptime\Program.cs:line 430
    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()</ExceptionString></Exception></TraceRecord>



  • Replied 8 September 2017, 3:12 pm EST

    Hello,

    I would need to look at your sample application in order to debug this issue further. It looks related to your project and not a generic issue with Spread. Please post a small sample application for me to debug.



    Thanks,
    Deepak Sharma
  • Replied 8 September 2017, 3:12 pm EST

    Hello,

    thanks for your reply. I try to extract a small sample application for you. But this will take I while.

    Best Regards

    Holger
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels