We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Exception when disposing of a GridGroupingControl

Thread ID:

Created:

Updated:

Platform:

Replies:

46056 Jul 5,2006 03:28 AM UTC Jul 6,2006 12:55 AM UTC WinForms 3
loading
Tags: GridControl
Bill Langlais
Asked On July 5, 2006 03:28 AM UTC

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.

Administrator [Syncfusion]
Replied On 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

Bill Langlais
Replied On 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

Bill Langlais
Replied On 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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;