Hello guys,
I have an issue with Infragistics Webdatagrid causing an $IG is undefined error. The setup is that the webdatagrid is used inside an ascx control, which is then used in a full webpage. When the webpage do a post back and switch to a different ascx control, $IG.ControlMain.prototype.__appendStyles lingers on the page and is causing the said error. I need a way to remove this javascript code or stop the grid from generating it?
Thanks,
Dan
Hello Dan,
This type of errors are thrown when some script files are missing on the client. Could you please use fiddler to see the request and if there is an error on the relevant request.
Looking forward to hearing from you.
Thanks for the reply. I have checked with fiddler to make sure there is no script errors. And I don't think the issue is script loading, because the error occurs after webdatagrid is removed from the page. I'm not sure if I worded it correctly in the initial post, but breaking the steps down:
-the page loads the acsx control that contains webdatagrid,
-User do something with the grid, and submits the page
-Page loads with a different acsx control, at this point, the page does not have infragistics control.
-$IG.ControlMain.prototype.__appendStyles still remains on the page, however, and caused the error during page loads.
Thank you for the detailed explanation.
I've tried to reproduce the issue on my side, based on your explanation, in order to investigate it further for you, although I couldn't. Could you please have a look at the attached sample and let me know what I am missing from your scenario.
Thank you for spending the time to try reproduce the issue. I looked over the sample, and the way you are handling the ascx controls is different. Rather than add both controls onto the page and use visibility to control what the user sees, our webpage uses a panel as a container and adds the appropriate webcontrol to the panel on the fly, depending on the state of the webpage; there is only 1 webcontrol in the panel at any given time.
I have followed your clarifications in order to create a sample as closest as possible to your scenario. You can find it attached to my reply. Basically I am using ASP Panel control, and on button click I am loading different user controls. The second user control doesn't have IG controls, just a TextBox control.
The sample is tested with Firefox, Chrome and IE 11, and no issue with append styles appear.
Please have a look at it and let me know what else I am missing from your scenario.