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. Image for the cookie policy date

Problem after upgrading from 4.3 to 4.4

Seems I'm having a problem with an application after upgrading from 4.3 to 4.4, with no other changes made to it. When the application is starting I'm getting the following error:

System.NullReferenceException: Object reference not set to an instance of an object.
at Syncfusion.Windows.Forms.Grid.Grouping.GridTableControl.InternalGetFrozenCols()
at Syncfusion.Windows.Forms.Grid.GridControlBase.Initialize()
at Syncfusion.Windows.Forms.Grid.Grouping.GridTableControl.Initialize()
at Syncfusion.Windows.Forms.Grid.Grouping.GridNestedTableControlCellRenderer..ctor(GridControlBase grid, GridCellModelBase cellModel)
at Syncfusion.Windows.Forms.Grid.Grouping.GridNestedTableControlCellModel.CreateRenderer(GridControlBase control)
at Syncfusion.Windows.Forms.Grid.GridCellRendererCollection.get_Item(String key)
at Syncfusion.Windows.Forms.Grid.Grouping.GridTableControl.Initialize()
at Syncfusion.Windows.Forms.Grid.Grouping.GridGroupingControl.OptimizeLoadTime()
at Syncfusion.Windows.Forms.Grid.Grouping.GridGroupingControl.f_Load(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(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.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.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)

8 Replies

AD Administrator Syncfusion Team December 11, 2006 04:12 PM UTC

Hi,

Are you trying to set ForzenColumns in GridGroupingControl? If so, please refer to the FrozenColumns sample at C:\Program Files\Syncfusion\Essential Studio\4.4.0.51\windows\Grid.Grouping.Windows\Samples\UnderstandingGroupingArchitecture\FrozenColumns\

If you can send us a demo sample showing the mentioned issue, it will be helpful for us to debug it here and give you a solution at the earliest.

Thanks,
Calvin.


AD Administrator Syncfusion Team December 11, 2006 04:38 PM UTC

Hi Calvin,

No I am not setting FrozenColumns or doing much else with this GGC. There is no data even being loaded into the dataset (I commented out the dataset load just to be sure the issue wasn't data related). This error appears just as the form becomes visable.

thx

>Hi,

Are you trying to set ForzenColumns in GridGroupingControl? If so, please refer to the FrozenColumns sample at C:\Program Files\Syncfusion\Essential Studio\4.4.0.51\windows\Grid.Grouping.Windows\Samples\UnderstandingGroupingArchitecture\FrozenColumns\

If you can send us a demo sample showing the mentioned issue, it will be helpful for us to debug it here and give you a solution at the earliest.

Thanks,
Calvin.


JS John Slater December 12, 2006 11:59 AM UTC

Calvin, I have not been able to reproduce this issue with a new project. But I still need help with this issue. I realize it is difficult to determine a possible solution when you cannot reproduce the problem, but this issue did NOT occur with Version 4.3. This project was originally built with VS2003 and was migrated to VS2005, but again ran fine with 4.3, and stopped working under 4.4.

I have however; narrowed the problem down to one line of Generated Code which causes the aformentioned errror:

this.gridGroupingControlMasterRecipe.TableDescriptor.Relations.AddRange(new Syncfusion.Windows.Forms.Grid.Grouping.GridRelationDescriptor[] {gridRelationDescriptor1});

Commenting this line of code prevents the error from occuring.

Thanks

>Hi Calvin,

No I am not setting FrozenColumns or doing much else with this GGC. There is no data even being loaded into the dataset (I commented out the dataset load just to be sure the issue wasn't data related). This error appears just as the form becomes visable.

thx

>Hi,

Are you trying to set ForzenColumns in GridGroupingControl? If so, please refer to the FrozenColumns sample at C:\Program Files\Syncfusion\Essential Studio\4.4.0.51\windows\Grid.Grouping.Windows\Samples\UnderstandingGroupingArchitecture\FrozenColumns\

If you can send us a demo sample showing the mentioned issue, it will be helpful for us to debug it here and give you a solution at the earliest.

Thanks,
Calvin.


AD Administrator Syncfusion Team December 12, 2006 05:31 PM UTC

Hi,

This is a bug in our code. Thanks for reporting it. We need to add an additional null reference for TableDescriptor != null in this method.





///

public override int InternalGetFrozenCols()

{

if (TableDescriptor != null && TableDescriptor.GetFrozenColumn() != "")

return TableDescriptor.GetColumnIndentCount() + TableDescriptor.GetFrozenColumnCount() - 1;

return base.InternalGetFrozenCols();

}





With the current code, you can work around the problem by deriving the GridTableControl and overriding that method. We will also provide a patch for 4.4 in a week or so with a fix for this issue.


Thanks,
Calvin.


AD Administrator Syncfusion Team December 12, 2006 06:10 PM UTC

Thanks for the response. I will test the patch when it becomes available.

>Hi,

This is a bug in our code. Thanks for reporting it. We need to add an additional null reference for TableDescriptor != null in this method.





///

public override int InternalGetFrozenCols()

{

if (TableDescriptor != null && TableDescriptor.GetFrozenColumn() != "")

return TableDescriptor.GetColumnIndentCount() + TableDescriptor.GetFrozenColumnCount() - 1;

return base.InternalGetFrozenCols();

}





With the current code, you can work around the problem by deriving the GridTableControl and overriding that method. We will also provide a patch for 4.4 in a week or so with a fix for this issue.


Thanks,
Calvin.


JD Johan Djupmarker January 3, 2007 10:04 AM UTC

Where can I find the patch?

/Johan


AD Administrator Syncfusion Team January 10, 2007 07:30 AM UTC

Hi Johan,

Can you please open a DirectTrac so that we can send you the private patch link there?

Thanks,
Calvin.


RD Raju Dantuluri June 12, 2007 09:42 PM UTC

We have run across what appears to be the exact same problem. (VS2003->VS2005 and 4.3->4.4 migration causing Grouping Grid to break). How can we download the patched binaries?

Thanks in advance...

Loader.
Live Chat Icon For mobile
Up arrow icon