Minimizing RadForm - LargeChange Error

5 posts, 0 answers
  1. Kevin White
    Kevin White avatar
    60 posts
    Member since:
    Jun 2004

    Posted 20 Nov 2009 Link to this post

    I hope this is something I can fix or have a workaround for? I've not found much help on this error thus far and debugging does not work because as soon as it minimizes the entire application just crashes.

    I have a RadGridView embedded in a Radform. With the latest version of Telerik Winform controls (Q3 2009), whenever anyone minimizes the application they are receiving the following Unhandled Exception (Taken from a user's error details) :

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    See the end of this message for details on invoking 
    just-in-time (JIT) debugging instead of this dialog box.

    ************** Exception Text **************
    System.ArgumentOutOfRangeException: Value of '-66' is not valid for 'LargeChange'. 'LargeChange' must be greater than or equal to 0.
    Parameter name: LargeChange
       at Telerik.WinControls.UI.RadScrollBarElement.set_LargeChange(Int32 value)
       at Telerik.WinControls.UI.GridTableElement.UpdateVScrollBarVisibility(SizeF bodySize)
       at Telerik.WinControls.UI.GridTableElement.ArrangeScrollbars(RectangleF& bodyRect, RectangleF clientRect)
       at Telerik.WinControls.UI.GridTableElement.ArrangeOverride(SizeF finalSize)
       at Telerik.WinControls.RadElement.ArrangeCore(RectangleF finalRect)
       at Telerik.WinControls.RadElement.Arrange(RectangleF finalRect)
       at Telerik.WinControls.RootRadElement.ArrangeOverride(SizeF finalSize)
       at Telerik.WinControls.RootRadElement.ArrangeCore(RectangleF finalRect)
       at Telerik.WinControls.RadElement.Arrange(RectangleF finalRect)
       at Telerik.WinControls.ComponentLayoutElementTree.PerformInnerLayout(Boolean performMeasure, Int32 x, Int32 y, Int32 width, Int32 height)
       at Telerik.WinControls.ComponentLayoutElementTree.SetBoundsCore(Int32 x, Int32 y, Int32 width, Int32 height, BoundsSpecified specified)
       at Telerik.WinControls.RadControl.SetBoundsCore(Int32 x, Int32 y, Int32 width, Int32 height, BoundsSpecified specified)
       at System.Windows.Forms.Control.System.Windows.Forms.Layout.IArrangedElement.SetBounds(Rectangle bounds, BoundsSpecified specified)
       at System.Windows.Forms.Layout.DefaultLayout.xLayoutDockedControl(IArrangedElement element, Rectangle newElementBounds, Boolean measureOnly, Size& preferredSize, Rectangle& remainingBounds)
       at System.Windows.Forms.Layout.DefaultLayout.LayoutDockedControls(IArrangedElement container, Boolean measureOnly)
       at System.Windows.Forms.Layout.DefaultLayout.xLayout(IArrangedElement container, Boolean measureOnly, Size& preferredSize)
       at System.Windows.Forms.Layout.DefaultLayout.LayoutCore(IArrangedElement container, LayoutEventArgs args)
       at System.Windows.Forms.Layout.LayoutEngine.Layout(Object container, LayoutEventArgs layoutEventArgs)
       at System.Windows.Forms.Control.OnLayout(LayoutEventArgs levent)
       at System.Windows.Forms.ScrollableControl.OnLayout(LayoutEventArgs levent)
       at System.Windows.Forms.ContainerControl.OnLayout(LayoutEventArgs e)
       at System.Windows.Forms.Control.PerformLayout(LayoutEventArgs args)
       at System.Windows.Forms.Control.System.Windows.Forms.Layout.IArrangedElement.PerformLayout(IArrangedElement affectedElement, String affectedProperty)
       at System.Windows.Forms.Layout.LayoutTransaction.DoLayout(IArrangedElement elementToLayout, IArrangedElement elementCausingLayout, String property)
       at System.Windows.Forms.Control.OnResize(EventArgs e)
       at System.Windows.Forms.UserControl.OnResize(EventArgs e)
       at System.Windows.Forms.Control.OnSizeChanged(EventArgs e)
       at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height, Int32 clientWidth, Int32 clientHeight)
       at System.Windows.Forms.Control.UpdateBounds()
       at System.Windows.Forms.Control.WmWindowPosChanged(Message& m)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       at System.Windows.Forms.ContainerControl.WndProc(Message& m)
       at System.Windows.Forms.UserControl.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


    ************** Loaded Assemblies **************
    mscorlib
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.832 (QFE.050727-8300)
        CodeBase: file:///C:/WINNT/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
    ----------------------------------------
    LeaseTracker
        Assembly Version: 1.0.0.41
        Win32 Version: 1.0.0.41
        CodeBase: file:///C:/Documents%20and%20Settings/username/Local%20Settings/Apps/2.0/YE25K15E.AGM/L6QQTPCW.T6C/leas..tion_03f857ef7799e71b_0001.0000_f20e28c53c4c191f/LeaseTracker.exe
    ----------------------------------------
    System.Windows.Forms
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.832 (QFE.050727-8300)
        CodeBase: file:///C:/WINNT/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    ----------------------------------------
    System
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.832 (QFE.050727-8300)
        CodeBase: file:///C:/WINNT/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
    ----------------------------------------
    System.Drawing
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.832 (QFE.050727-8300)
        CodeBase: file:///C:/WINNT/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    ----------------------------------------
    Telerik.WinControls.UI
        Assembly Version: 2009.3.9.1103
        Win32 Version: 2009.3.9.1103
        CodeBase: file:///C:/Documents%20and%20Settings/username/Local%20Settings/Apps/2.0/YE25K15E.AGM/L6QQTPCW.T6C/leas..tion_03f857ef7799e71b_0001.0000_f20e28c53c4c191f/Telerik.WinControls.UI.DLL
    ----------------------------------------
    Telerik.WinControls
        Assembly Version: 2009.3.9.1103
        Win32 Version: 2009.3.9.1103
        CodeBase: file:///C:/Documents%20and%20Settings/username/Local%20Settings/Apps/2.0/YE25K15E.AGM/L6QQTPCW.T6C/leas..tion_03f857ef7799e71b_0001.0000_f20e28c53c4c191f/Telerik.WinControls.DLL
    ----------------------------------------
    NLog
        Assembly Version: 1.0.0.505
        Win32 Version: 1.0.0.505
        CodeBase: file:///C:/Documents%20and%20Settings/username/Local%20Settings/Apps/2.0/YE25K15E.AGM/L6QQTPCW.T6C/leas..tion_03f857ef7799e71b_0001.0000_f20e28c53c4c191f/NLog.DLL
    ----------------------------------------
    System.Configuration
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.832 (QFE.050727-8300)
        CodeBase: file:///C:/WINNT/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
    ----------------------------------------
    System.Xml
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.832 (QFE.050727-8300)
        CodeBase: file:///C:/WINNT/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
    ----------------------------------------
    System.Web
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.832 (QFE.050727-8300)
        CodeBase: file:///C:/WINNT/assembly/GAC_32/System.Web/2.0.0.0__b03f5f7f11d50a3a/System.Web.dll
    ----------------------------------------
    System.Messaging
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.42 (RTM.050727-4200)
        CodeBase: file:///C:/WINNT/assembly/GAC_MSIL/System.Messaging/2.0.0.0__b03f5f7f11d50a3a/System.Messaging.dll
    ----------------------------------------
    TrackerLibrary
        Assembly Version: 1.0.0.0
        Win32 Version: 1.0.0.0
        CodeBase: file:///C:/Documents%20and%20Settings/username/Local%20Settings/Apps/2.0/YE25K15E.AGM/L6QQTPCW.T6C/leas..tion_03f857ef7799e71b_0001.0000_f20e28c53c4c191f/TrackerLibrary.DLL
    ----------------------------------------
    TelerikCommon
        Assembly Version: 2009.3.9.1103
        Win32 Version: 2009.3.9.1103
        CodeBase: file:///C:/Documents%20and%20Settings/username/Local%20Settings/Apps/2.0/YE25K15E.AGM/L6QQTPCW.T6C/leas..tion_03f857ef7799e71b_0001.0000_f20e28c53c4c191f/TelerikCommon.DLL
    ----------------------------------------
    Telerik.WinControls.GridView
        Assembly Version: 2009.3.9.1103
        Win32 Version: 2009.3.9.1103
        CodeBase: file:///C:/Documents%20and%20Settings/username/Local%20Settings/Apps/2.0/YE25K15E.AGM/L6QQTPCW.T6C/leas..tion_03f857ef7799e71b_0001.0000_f20e28c53c4c191f/Telerik.WinControls.GridView.DLL
    ----------------------------------------
    System.Data
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.832 (QFE.050727-8300)
        CodeBase: file:///C:/WINNT/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
    ----------------------------------------
    Telerik.WinControls.Themes.Office2007Silver
        Assembly Version: 2009.3.9.1103
        Win32 Version: 2009.3.9.1103
        CodeBase: file:///C:/Documents%20and%20Settings/username/Local%20Settings/Apps/2.0/YE25K15E.AGM/L6QQTPCW.T6C/leas..tion_03f857ef7799e71b_0001.0000_f20e28c53c4c191f/Telerik.WinControls.Themes.Office2007Silver.DLL
    ----------------------------------------
    Telerik.WinControls.Themes.Miscellaneous
        Assembly Version: 2009.3.9.1103
        Win32 Version: 2009.3.9.1103
        CodeBase: file:///C:/Documents%20and%20Settings/username/Local%20Settings/Apps/2.0/YE25K15E.AGM/L6QQTPCW.T6C/leas..tion_03f857ef7799e71b_0001.0000_f20e28c53c4c191f/Telerik.WinControls.Themes.Miscellaneous.DLL
    ----------------------------------------
    Accessibility
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.42 (RTM.050727-4200)
        CodeBase: file:///C:/WINNT/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
    ----------------------------------------
    System.Transactions
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.832 (QFE.050727-8300)
        CodeBase: file:///C:/WINNT/assembly/GAC_32/System.Transactions/2.0.0.0__b77a5c561934e089/System.Transactions.dll
    ----------------------------------------
    System.EnterpriseServices
        Assembly Version: 2.0.0.0
        Win32 Version: 2.0.50727.832 (QFE.050727-8300)
        CodeBase: file:///C:/WINNT/assembly/GAC_32/System.EnterpriseServices/2.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
    ----------------------------------------
    irsznm34
        Assembly Version: 1.0.0.0
        Win32 Version: 2.0.50727.832 (QFE.050727-8300)
        CodeBase: file:///C:/WINNT/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
    ----------------------------------------

    ************** JIT Debugging **************
    To enable just-in-time (JIT) debugging, the .config file for this
    application or computer (machine.config) must have the
    jitDebugging value set in the system.windows.forms section.
    The application must also be compiled with debugging
    enabled.

    For example:

    <configuration>
        <system.windows.forms jitDebugging="true" />
    </configuration>

    When JIT debugging is enabled, any unhandled exception
    will be sent to the JIT debugger registered on the computer
    rather than be handled by this dialog box.

  2. Deyan
    Admin
    Deyan avatar
    2037 posts

    Posted 23 Nov 2009 Link to this post

    Hi Kevin,

    Thanks for contacting us and for reporting this issue.

    I have tried to reproduce it but unfortunately to no avail.

    Therefore, I would like to ask you to prepare a small Windows Forms application that we can use to investigate the case and see how we can help.

    Thanks for your time.

    All the best,
    Deyan
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. mark thompson
    mark thompson avatar
    5 posts
    Member since:
    Oct 2009

    Posted 24 Feb 2010 Link to this post

    Hi,
    I have also had this reported by my users.

    What has changed is that there are ever more columns on the Grid.

    Interestingly the user was not using the app at the time. They had left their desk for about 10 minutes and came back to find the error.

    I'm going to change the way I do scrolling today to see if that makes a difference.

    thanks
    mark
  5. mark thompson
    mark thompson avatar
    5 posts
    Member since:
    Oct 2009

    Posted 24 Feb 2010 Link to this post

    Hi,
    an update already.
    This is a hard problem for me now.

    to reproduce: create a grid with a lot of columns. More columns than will really fit in the default size of the containing form.
    Then simply minimize the form  and bang ....

    This is the method that has the problem:
    private bool UpdateHScrollBarVisibility(SizeF bodySize, SizeF vscrollbarSize)
    {
        bool flag = false;
        TableViewDefinitionBase viewDefinition = (TableViewDefinitionBase) this.GridViewInfo.ViewTemplate.ViewDefinition;
        if (this.ViewTemplate.HorizontalScrollState == ScrollState.AlwaysHide)
        {
            flag = false;
        }
        else if (this.ViewTemplate.HorizontalScrollState == ScrollState.AlwaysShow)
        {
            flag = true;
        }
        else
        {
            flag = ((this.ViewTemplate.AutoSizeColumnsMode != GridViewAutoSizeColumnsMode.Fill) && (viewDefinition.DesiredSize.Width > bodySize.Width)) && (bodySize.Width > 1f);
        }
        if (flag)
        {
            this.hscrollBar.Maximum = (int) viewDefinition.DesiredSize.Width;
            this.hscrollBar.LargeChange = (int) bodySize.Width;
            return true;
        }
        this.hscrollBar.Value = 0;
        return false;
    }
    

    It has been passed a bodySize.width that is negative. and the property throws this exception when a negative value has been passed.

    mark
  6. Deyan
    Admin
    Deyan avatar
    2037 posts

    Posted 25 Feb 2010 Link to this post

    Hello Mark

    I would like to inform you that this issue will be addressed in the upcoming Q1 2010 release of RadControls for WinForms. This release is scheduled for the beginning of the next month so you can check out our website on a regular basis for further information. You can also subscribe to our blogs. Thanks for your time.

    Regards,
    Deyan
    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.
Back to Top
UI for WinForms is Visual Studio 2017 Ready