We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Aspose Web Grid Runtime Error - Object not set


I am getting the error shown below using the Aspose web grid 1.9.4. I am using VS.NET 2005, IE 6.0. ASP.NET 2.0, Ajax is not enabled.

I have a combo box on the page which is an auto postback. If there aren't any products for the selected item in the combobox, I set the grid visible to false, which works great. It's when I select another item from the combo box I get the runtime error.

Thanks in advance for your help.



Object reference not set to an instance of an object.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.]
   Aspose.Grid.Web.GridWeb.،(String ؍, Boolean ؎, Boolean ؏) +140
   Aspose.Grid.Web.GridWeb.ؤ(String إ, NameValueCollection ئ) +212
   System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +718
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3776


Thanks for considering Aspose.

Could you create a sample test project with all the .aspx and .cs/vb files etc., zip it and post it here to reproduce the issue you are talking about.

We will check it soon.

Thank you.

Here is the sample test project you requested.

To reproduce the error - select the combo box values in reverse order - 3, 2, 1. You should get the run time error after you select the 1.



It is not recommended to use the PreRender event of the grid. I move the code in the prerender event handler to the Page_Load event handler, and the grid works as desired.

Thank you for considering Aspose.