jQWidgets Forums
jQuery UI Widgets › Forums › Grid › TypeError: Cannot read property 'style' of undefined
Tagged: grid, javascript grid, jQuery
This topic contains 5 replies, has 2 voices, and was last updated by Peter Stoev 9 years, 7 months ago.
-
Author
-
Hello
I’ve recently updated from jqwidgets-ver3.6.0 to jqwidgets-ver3.8.2.
I’m getting “TypeError: Cannot read property ‘style’ of undefined” when using jqwidgets-ver3.8.2.I get this error when calling $(“#products”).jqxGrid(‘gotonextpage’);
when i revert back to jqwidgets-ver3.6.0 the problem goes away.
What am i doing wrong?here is the call stack
Uncaught TypeError: Cannot read property ‘style’ of undefined(anonymous function) @ jqxgrid.js:7jQuery.extend.each @ jquery.js:383b.extend._updatecolumnwidths @ jqxgrid.js:7a.extend.gotopage @ jqxgrid.pager.js:7a.extend.gotoprevpage @ jqxgrid.pager.js:7a.jqx.invoke @ jqxcore.js:7a.jqx.jqxWidgetProxy @ jqxcore.js:7(anonymous function) @ jqxcore.js:7jQuery.extend.each @ jquery.js:383jQuery.fn.jQuery.each @ jquery.js:136a.jqx.jqxWidget.a.fn.(anonymous function) @ jqxcore.js:7(anonymous function) @ order_client.js:310jQuery.event.dispatch @ jquery.js:4641jQuery.event.add.elemData.handle @ jquery.js:4309
jqxgrid.js:7 Uncaught TypeError: Cannot read property ‘style’ of undefined(anonymous function) @ jqxgrid.js:7jQuery.extend.each @ jquery.js:383b.extend._updatecolumnwidths @ jqxgrid.js:7a.extend.gotopage @ jqxgrid.pager.js:7a.extend.gotonextpage @ jqxgrid.pager.js:7a.jqx.invoke @ jqxcore.js:7a.jqx.jqxWidgetProxy @ jqxcore.js:7(anonymous function) @ jqxcore.js:7jQuery.extend.each @ jquery.js:383jQuery.fn.jQuery.each @ jquery.js:136a.jqx.jqxWidget.a.fn.(anonymous function) @ jqxcore.js:7(anonymous function) @ order_client.js:301jQuery.event.dispatch @ jquery.js:4641jQuery.event.add.elemData.handle @ jquery.js:4309Hi jonno,
We do not know what you’re doing and when you call that method. Provide jsfiddle.net demo which demonstrates an issue and we will tell you why you get this error. The fact that you call a method used by the Pager means that most probably you call it when your data is still loading or your Grid is not rendered at all.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comWhen i simply revert from jqwidgets-ver3.8.2 back to jqwidgets-ver3.6.0 (no other code changes) the problem does not occur.
So something underlying has changed.I’ll try and get a jfiddle to demonstrate the problem.
Hi jonno,
Many things have changed so the provided information is insufficient.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comI was preparing the jsfiddle and i noticed https://jqwidgets.com/public/jqwidgets/jqx-all.js is now jqwidgets-ver3.9.0
I tested my existing code from jqwidgets-ver3.8.2 to use jqwidgets-ver3.9.0 and it no longer has the error.
The error has been fixed in your jqwidgets code somewhere between ver3.8.2 to 3.9.0.
FYI, since using 3.9.0 i’ve noticed nothing else broken, all good.
-
AuthorPosts
You must be logged in to reply to this topic.