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)
I'm already using version 1.6.0.0. 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.
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.
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.
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 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.