Free Support Forum -

Problems regarding GridDesktopControl && Dockstyle.Fill

Dear all,

at the moment I’m evaluating the Aspose.GridDesktopControl. Actually I’m dealing with my first problem. If I change the property Dock to Dockstyle.Fill (using the VS) and run my application I get the following exception:

System.ArgumentException: '-1' ist kein gültiger Wert für 'LargeChange'. 'LargeChange' muss größer oder gleich 0 sein.

at System.Windows.Forms.ScrollBar.set_LargeChange(Int32 value)

at Aspose.Grid.Desktop.GridDesktop.?()

at Aspose.Grid.Desktop.GridDesktop.OnResize(EventArgs e)

If I don’t use Dockstyle.Fill it works fine.



Thank you for evaluating the Aspose.GridDesktop control.

This problem has been solved in prior version. Please check control version. The last version is 1.6.0.

I have tried the Dockstyle.Fill property , it's ok.


I'm already using version I have downloaded the latest version today. I'm using MDI forms that a generated at runtime. What can I do to localize this error?



Aspose.Grid.Desktop.Demos.Features demonstrates GridDesktop control in MDI forms. You can find the source in "C:\Program Files\Aspose\Aspose.Grid\demos\Aspose.Grid.Desktop.Demos\Aspose.Grid.Desktop.Demos.Features" folder.

I changed the GridDesktop control's DockStyle to Fill in FormBase.cs. It's ok.

Can you post your project in attachement? I'll try it.


Unfortunately I’m not able to post my current project. It is to large and it depends on a lot of database stuff. Furthermore I’m at the moment not able to reproduce the error, but I know the place where the exception is raised. Please find enclosed the list of steps that leads into the exception.

  1. Create a Control (derived from UserControl). The instance of the control is created by the use of a class loader mechanism. This step works fine.
  2. After this, I try to add the control to a TabPage object (I’m using DotNetMagic, but this shouldn’t be the problem) that serves as a container for the control. During this process, the exception is thrown. First of all I set the Dock property of my Control to Dockstyle.Fill. Then I add the Control to the Controls Collection of the TabPage. This step throws the exception.

I have tried to reproduce this procedure in a test environment. Unfortunately there everything works fine. At the moment I set the Fill property of the grid a later point of time (If the control is shown the first time). If I’m able to reproduce the exception, I will send you the corresponding test project.




I download DotNetMagic 3.01 for VS .NET 2003 to use the TabControl. And I implement a test project by your steps, but no exception thrown.

When you reproduce the exception, please post it.



I' m able to reproduce the exception. I will send you the complete project (source files + binaries) by next monday.

Take Care



Attached please find the promised demo project. Within this project I simulate the needed functions out of set of various basic projects that are necessary to reproduce the error. The error closely depends on the docking manager control of DotNetMagic, but I believe the internal error occurs at the grid control.

The content of the docking manager is defined at the “StandardInhaltForm“. One part of this manager is a Tabcontrol element. This control contains needed dialogs for a certain part of an application. Every dialog is derived from “BasicInhaltsAnzeige”. Due to the fact that the content of the tabcontrol depends on an xml file, I create each control at runtime using a class loader mechanism (within the sample project I didn’t realise that. I create a concrete instance of the class instead --> UserControl1). Finally I add my dialog to a tabpage control (InformationsTabPageInhaltsAnzeige). In this class, at line 35 the error is thrown (adding the dialog to the Controls set of the tabpage).

I hope that you are able to fix this.



Hi Erik,

I have fixed the bug. Please try v1.6.2 in attachment.

When the project runs, I can't find the GridDesktop control. So, I add the following code at the end of "initialisiereLayout" in StandardInhaltForm.cs.

mNavigatonsMenue = mDockingManager.Contents.Add(tab);
mDockingManager.AddContentWithState(mNavigatonsMenue, State.Floating);

The GridDesktop is now shown.


Thanks for your support. It seems that the bug is fixed.

In the sample project the grid Control was a member of the class “UserControl1”.

When will you provide a new “official” download / hotfix that contains the fixes of version and version

Best regards


We will release version 1.7.0 at earlier July. It contains 1.6.1 and 1.6.2.