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

Free Support Forum - aspose.com

Aspose grid throwing exception

Hi,

A while back I made a couple of posts two. At that time I wasn’t able to reproduce the exception. Now I am able to reproduce my issues. PFA the attached project. Initially, the exception “JavaScript runtime error: Object doesn’t support property or method ‘appendChild’” can be continued past. After editing a single cell, as soon as you click on another cell/save button it throws more exceptions. Could I have a resolution for this. For context please refer to my older linked posts.

Thanks.

Hi Abhishek,


Thank you for sharing the sample project.

We have evaluated your project while using the Aspose.Cells.GridWeb for .NET 8.7.0 and we are able to observe two problems as detailed below.

  • JavaScript runtime error: Object doesn’t support property or method ‘appendChild’ while loading the GridWeb in IE 11. We have logged this incident as CELLSNET-44247.
  • NullReferenceException: Object reference not set to an instance of an object caused. This exception can be observed when we click continue on the JavaScript error as mentioned above, and click save button after inserting some value in cell A1. We have logged this incident as CELLSNET-44248 in our bug tracking system.

Please spare us little time to further investigate the matter and get back with updates in this regard.


Hi,

Is it possible to get a workaround on this? This is a major blocker in our project. Could you provide any update regarding this?
Hi Abhishek,

I am afraid, we cannot share any updates or possible workaround unless we have thoroughly analyzed the scenario on our side. Please note, the aforementioned tickets are currently pending for analysis and are in the queue with other priority tasks. As soon as we have completed the preliminary analysis, we will share the results here for your kind reference.

Hi,


Please try our latest version/fix: Aspose.Cells.GridWeb v8.7.1 (you may install the latest version of Aspose.Cells for .NET v8.7.1 package and get the latest version of Aspose.Cells.GridWeb from your installation directory).

Please replace the “acwmain.js” file in your resource folder (e.g “…\acw_client”) with the attached “acwmain.js” file. Also, when updating client js scripting file, don’t forget to delete cache in your browser.

Your both issues (“CELLSNET-44247” and “CELLSNET-44248”) should be fixed.

Let us know your feedback.

Thank you.

Hi,

Even with the latest version/fix, the same issues are still there. You could confirm it by replacing the dlls and acwmain.js in the project I provided in my original post. Currently it throws the error: “Unhandled exception at line 1657, column 5 in http://localhost:19766/acw_client/acwmain.js

0x800a138f - JavaScript runtime error: Unable to get property ‘appendChild’ of undefined or null reference”. On clicking Continue:
“0x800a01b6 - JavaScript runtime error: Object doesn’t support property or method ‘appendChild’” comes up.

And after that no clicks work. Clicking on any cell or save icon, sheets doesn’t seem to be having any effect.
Hi Abhishek,

Thank you for sharing the feedback. We suspect that you are using Internet Explorer 11 as we are able to replicate the error 0x800a01b6 - JavaScript runtime error: Object doesn't support property or method 'appendChild' on IE11. Please note, the issue isn't reproducible on other browsers as per our testing. Moreover, we are not able to replicate the error 0x800a138f - JavaScript runtime error: Unable to get property 'appendChild' of undefined or null reference. Could you please share the snapshots of the errors along with browser type and version so we may log it for further review?

Hi,

It is a necessity we run on IE. Currently I am using IE v11.0.10240.16683. As soon as I run the project I get the error 0x800a138f - JavaScript runtime error: Unable to get property ‘appendChild’ of undefined or null reference.
Here’s a screenshot using the same project posted originally (with new versions of the files supplied). Please do post if any further information is required to debug this.

Hi Abhishek,

Thank you for sharing the snapshot. Please note, I am testing the scenario on IE 11 (11.103.10586.0), and the mentioned issue is not reproducible on my end. However, I have recorded your observations along with snapshot to the existing ticket CELLSNET-44247 for product team’s review. Please spare us little time for further analysis. In the meanwhile, we will keep you posted with updates in this regard.

Hi,

I tried running it on a different machine which had IE 11 (11.103.10586.0) and still was able to reproduce the issue. Another thing I noticed while trying on Chrome, even though I can edit the cells on Chrome, clicking on the save button does nothing and I can’t switch sheets to the other sheet which has the Aspose evaluation copyright warning.

Hi Abhishek,


Could you be kind enough to create an archive of your current sample project and reattach it here? As we are not able to see the problem that you are having on your end, it could be due to some changes done in the project. Thank you for your cooperation and patience.

Hi,

Reattaching the file as per your request.

Hi Abhishek,


Thank you for sharing the project again. I am finally able to observe the JavaScript runtime error: Unable to get property ‘appendChild’ of undefined or null reference error and I have logged it as a separate ticket with Id CELLSNET-44264. Please spare us little time to properly analyze this incident and get back with updates in this regard.

Hi again,


Please try the latest version of Aspose.Cells.GridWeb 8.7.1.3 for the issues logged earlier as CELLSNET-44264, CELLSNET-44247 & CELLSNET-44248. Please do not forget to update the latest JavaScript files (included in the archive) and clear the cache of IE 11 before performing any tests. Moreover, in your code of InitializeAsposeGrid method, you are setting the GridWeb.EnableViewState property to false, which should be true because GridWeb needs to cooperate with client side instance. Also, you are using JavaScript’s init method in your code which has been renamed (to menuinit) and is being used internally by the GridWeb component only therefore if you receive an error about init method not being available, its not an issue of Aspose.Cells.GridWeb component.

Hi again,

Thanks for the new patch. It did solve the previous issues. Even though those issues aren’t there, the grid still isn’t fully functional. For eg. as soon as I type in a cell and switch focus to a different one, it throws an exception saying:
0x800a138f - JavaScript runtime error: Unable to set property ‘backgroundColor’ of undefined or null reference
If you “Continue” past that, neither does the save button respond, nor can you switch to the other Excel sheet which has the evaluation license disclaimer. (Note: if you try to do either of these functions first without ever having shifted focus from a cell, they work fine.) Also as mentioned before, I am facing this issue in IE11.

Hi Abhishek,


Thank you for your feedback and sharing the sample application.

I have evaluated the scenario and I am able to replicate the said issue on my side, however, this problem isn’t reproducible with any other sample project I have been testing recently. Please allow me some time to look further into this matter. I will shortly get back to you with updates in this regard.

Thank you Babar. Also forgot to mention in my last post that I commented out the lines which had Viewstate set to false and also where we were referring to init javascript function. The attached file in my last post is updated accordingly.

Hi Abhishek,


Thank you for providing more information. I have logged the recently shared scenario in our bug tracking system as CELLSNET-44289. Please spare us little time to properly analyze the problem cause and get back with updates in this regard.

Hi again,


This is to update you that we have investigated the problem cause for the issue logged earlier as CELLSNET-44289. The mentioned JavaScript error is caused because you are setting the XhtmlMode property to false in InitializeAsposeGrid method. It should be true or you can comment out this statement because default value is true as well. Give it a try as per above mentioned solution and let us know of your feedback.

Hi,

Thanks a lot for the last suggestion. Now it works! Could you brief on what exactly the XhtmlMode property affects?