Exception when disposing of a GridGroupingControl
I have a application that uses a GridGroupingControl with a dataset with 5 related tables. I was having performance problems with adding records to the table after the first load. An engineer at SyncFusion suggested I dispose of the Grid before I add data to the tables and create a new grid after the records are added. This worked fine for a while byut now when I dispose of the original grid I get the following exception, any help would be appreciated:
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at Syncfusion.Windows.Forms.Grid.Grouping.GridGroupingControl.OnValidating(CancelEventArgs e)
at System.Windows.Forms.Control.NotifyValidating()
at System.Windows.Forms.ContainerControl.ValidateThroughAncestor(Control ancestorControl)
at System.Windows.Forms.ContainerControl.EnterValidation(Control enterControl)
at System.Windows.Forms.ContainerControl.UpdateFocusedControl()
at System.Windows.Forms.ContainerControl.AssignActiveControlInternal(Control value)
at System.Windows.Forms.ContainerControl.ActivateControlInternal(Control control, Boolean originator)
at System.Windows.Forms.ContainerControl.ActivateControlInternal(Control control)
at System.Windows.Forms.Control.WmSetFocus(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll
----------------------------------------
SkiTrack
Assembly Version: 1.0.2376.40293
Win32 Version:
CodeBase: file:///c:/Documents%20and%20Settings/BillLanglais.PERCUSSION_NT/My%20Documents/Visual%20Studio%20Projects/SkiTrack/Debug/SkiTrack.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll
----------------------------------------
System
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
----------------------------------------
System.Drawing
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
----------------------------------------
Syncfusion.Grid.Grouping.Windows
Assembly Version: 4.201.0.37
Win32 Version: 4.201.0.37
CodeBase: file:///c:/windows/assembly/gac/syncfusion.grid.grouping.windows/4.201.0.37__3d67ed1f87d44c89/syncfusion.grid.grouping.windows.dll
----------------------------------------
Syncfusion.Grouping.Base
Assembly Version: 4.201.0.37
Win32 Version: 4.201.0.37
CodeBase: file:///c:/windows/assembly/gac/syncfusion.grouping.base/4.201.0.37__3d67ed1f87d44c89/syncfusion.grouping.base.dll
----------------------------------------
Syncfusion.Core
Assembly Version: 4.201.0.37
Win32 Version: 4.201.0.37
CodeBase: file:///c:/windows/assembly/gac/syncfusion.core/4.201.0.37__632609b4d040f6b4/syncfusion.core.dll
----------------------------------------
Syncfusion.Grid.Windows
Assembly Version: 4.201.0.37
Win32 Version: 4.201.0.37
CodeBase: file:///c:/windows/assembly/gac/syncfusion.grid.windows/4.201.0.37__3d67ed1f87d44c89/syncfusion.grid.windows.dll
----------------------------------------
Syncfusion.Shared.Base
Assembly Version: 4.201.0.37
Win32 Version: 4.201.0.37
CodeBase: file:///c:/windows/assembly/gac/syncfusion.shared.base/4.201.0.37__3d67ed1f87d44c89/syncfusion.shared.base.dll
----------------------------------------
System.Xml
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.xml/1.0.5000.0__b77a5c561934e089/system.xml.dll
----------------------------------------
System.Data
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.data/1.0.5000.0__b77a5c561934e089/system.data.dll
----------------------------------------
Accessibility
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/accessibility/1.0.5000.0__b03f5f7f11d50a3a/accessibility.dll
----------------------------------------
************** JIT Debugging **************
To enable just in time (JIT) debugging, the config file for this
application or machine (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:
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the machine
rather than being handled by this dialog.
SIGN IN To post a reply.
3 Replies
AD
Administrator
Syncfusion Team
July 5, 2006 04:19 PM UTC
Hi Bill,
Please refer to our shipped browser sample ''GroupingPerf'' [ \\windows\Grid.Grouping.Windows\Samples\GroupingPerf ] which demonstrates a way to add / remove records in the grid using engine optimization technique. Also provide us details on your application and also more information about disposing the grid in your project, if possible upload us sample / code snippet.
Best regards,
Madhan
BL
Bill Langlais
July 6, 2006 12:42 AM UTC
The application is rather large, in the neighborhood of 10 meg with they needed runtime files. I will upload you the code that deals with the grid.
The way it works is the application starts upand initializes all the windo elements except the grid. When data is first loaded into 5 related tables with aproximately 1,1,1,50,8000 records starting from the top level to the bottom level table. After the data is loaded the GridgroupingControl is created and the dataset and top level table are assigned to the grid. When the user requests another set of data be added to the tables (all inserts) the grids is eliminated by calling Dispose before the data is added. This is when the exception occurs. This was working at first but suddenly broke with the above message.
Please remove the zip file as soon as you can because the code is propritary.
>Hi Bill,
>
>Please refer to our shipped browser sample ''GroupingPerf'' [ \\windows\Grid.Grouping.Windows\Samples\GroupingPerf ] which demonstrates a way to add / remove records in the grid using engine optimization technique. Also provide us details on your application and also more information about disposing the grid in your project, if possible upload us sample / code snippet.
>
>Best regards,
>Madhan
>
Exception4.zip
Exception4.zip
BL
Bill Langlais
July 6, 2006 12:55 AM UTC
Hi,
I think I figured out the problem. When I disposed the grid I had not removed it from the tabpage that it was a child on. I changed that so it removed the grid before disposing the grid and that seems to have resolved the problem. I am not sure why it ever worked!!
Please remove my zip file.
Thanks!
>The application is rather large, in the neighborhood of 10 meg with they needed runtime files. I will upload you the code that deals with the grid.
>
> The way it works is the application starts upand initializes all the windo elements except the grid. When data is first loaded into 5 related tables with aproximately 1,1,1,50,8000 records starting from the top level to the bottom level table. After the data is loaded the GridgroupingControl is created and the dataset and top level table are assigned to the grid. When the user requests another set of data be added to the tables (all inserts) the grids is eliminated by calling Dispose before the data is added. This is when the exception occurs. This was working at first but suddenly broke with the above message.
>
> Please remove the zip file as soon as you can because the code is propritary.
>
>
>>Hi Bill,
>>
>>Please refer to our shipped browser sample ''GroupingPerf'' [ \\windows\Grid.Grouping.Windows\Samples\GroupingPerf ] which demonstrates a way to add / remove records in the grid using engine optimization technique. Also provide us details on your application and also more information about disposing the grid in your project, if possible upload us sample / code snippet.
>>
>>Best regards,
>>Madhan
>>
Exception4.zip
Exception4.zip
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
BL Bill Langlais
- Jul 5, 2006 03:28 AM UTC
- Jul 6, 2006 12:55 AM UTC