Probelem of System.NullReferenceException

Hello,

I have a problem with GGC component ,when I start the page I get this exception System.NullReferenceException and error message :object not defined as any instance of object.
How to fix this problem

Yacinus

3 Replies

GB Gokul B Syncfusion Team July 11, 2007 09:18 PM UTC

Hi Yacinus,

Thanks for posting us your query.

We can able to reproduce the issue as in attached image. If this is an issue, could you please try the below code snippet and Let us know.

//Maintains the GridGroupingControl's viewstate on PostBack
this.GridGroupingControl1.DataSourceCachingMode=DataSourceCachingMode.ViewState

GridGroupingControl_Issue

If this is not a case, could you please update us the steps to reproduce the issue and also please update us with the sample which causes this issue. It will help us to sort out the issue earlier.

Thanks for using Syncfusion product.

Regards,
Gokulkumar B


YY Yarius Yacinus July 12, 2007 09:38 AM UTC

Hi Gellukmar

Thanks for your answer,the problem is that the Grid grouping conrol1 does not contain a definition for 'DataSourceCatchingMode'

For information I have the version 4.2.0.37 of syncfusion

Regards
Yacinus


GB Gokul B Syncfusion Team July 12, 2007 08:51 PM UTC

Hi Yacinus,

Thanks for your update.

We are able to reproduce the issue only when the GridGroupingControl is binded in Page_load event. Since in our GridGroupingControl viewstate was not get maintained for subsequest postback/callback when it is binded in Page_Load event. This issue has been fixed in our Latest 5.1.0.51 release by adding a new property named "DataSourceCachingMode" for GridGroupingControl.

To get rid of this issue you have to bind the GridGroupingControl in Page_Init event itself.In the meantime, please refer to the below forum thread where similar viewstate issue is discussed.

http://www.syncfusion.com/support/Forums/message.aspx?&MessageID=51399

Try this and let us know if it helps.

Regards,
Gokulkumar B

Loader.
Up arrow icon