Microsoft JScript runtime error: Unable to get value of the property ‘currentStyle’: object is null or undefined
It looks like that webgrid override the print function so if I call window.print() it goes straight into acwmain.js file at line "var originalViewPanelOverflow=xViewPanel.currentStyle.overflow;"
Could you please help me to get ride this problem, I need to use window.print() function along with web grid on page.
Let me know if anything else you need.
Thanks for creating a demo.
We have logged this issue in our database. We will look into it and provide you a solution or fix asap.
This issue has been logged as CELLSNET-40480.
No I used latest version and still same problem.
Thanks for testing it with latest version.
I have logged your comment against the issue id: CELLSNET-40480
After investigation, we found that you are not using the latest acw_main directory.
Please use the latest acw_main directory and more specifically use the latest acwmain.js file
I have packaged it, you can find it from this link:
for GridWeb v184.108.40.2060
Please also note that we override print method, so clients can use
gridwebid.print() method to print.
I just tested with latest version but no luck :(.
And to make it clear I do not want to use gridwebid.print() method instead just default window method, so could it be possible to do that?
Did you use the latest acwmain.js file?
Please attach it here, so that I could make sure you are using the latest one.
Please use webgrid.print() method instead of window print method because it has overriden the window print method.
Probably, you will have to override webgrid.print method if you want to bypass it.
The file is attached. Could you explain how would I re-override the webgrid.print method?
Please use something like this to use the print function.
<asp:Button onClick = “<% this.GridWeb1.ID %>.print();return false;” …/>
We have made the following changes in your demo files.
var newprint = window.print;
<a href="#" onclick='<%=this.GridWeb1.ClientID%>.print(); '>print function by gridweb</a>
If you want to use default print function of window.print; you can try “newprint();”
If user want to use default print function by gridweb, you can try <%=this.GridWeb1.ClientID%>.print();
Please add Aspose.Cells for GridWeb DLL when you build the project.
Thanks Shakeel, much
<![endif]–><!–[if gte mso 9]>
<m:mathFont m:val=“Cambria Math”/>
<![endif]–><!–[if gte mso 10]>
mso-bidi-font-family:“Times New Roman”;mso-bidi-theme-font:minor-bidi;
gridRV = document.getElementById('<%= gwRV.ClientID %>');
Thanks for your posting and using Aspose.Cells.
I have tested this issue with the sample project attached with earlier post with the latest version of GridWeb i.e Aspose.Cells for .NET 8.5.2 and found GridWeb print works fine in FireFox but it does not work on Chrome.
I have attached the screenshots of my results for a reference.
We have logged this issue in our database for investigation. We will look into it and fix this issue. Once the issue is resolved or we have some other update for you, we will let you know asap.
This issue has been logged as
- CELLSNET-43875 - Gridweb Print on Chrome does not work correctly
Thanks for using Aspose.Cells.
This is to inform you that we have fixed your issue CELLSNET-43875 now. We will soon provide the fix after performing QA and including other enhancements and fixes.
Thanks for using Aspose.Cells for GridWeb.
We have fixed this issue in acwmain.js file which is attached with this post. Please download it and remove its .txt extension because I added this extension just to upload it on this post.
I have also attached the latest GridWeb version, please download it and use it and before using it, replace its existing acwmain.js file with the attached fixed acwmain.js file. The acwmain.js is found inside the acw_client directory.
Let us know your feedback.