jQuery UI Widgets › Forums › Grid › Uncaught TypeError: Cannot read property 'dataAdapter' of undefined
Tagged: dataadapter, grid, jqxdata.js, jqxgrid, Uncaught TypeError
This topic contains 3 replies, has 4 voices, and was last updated by Dimitar 8 years, 9 months ago.
-
Author
-
October 31, 2014 at 3:36 pm Uncaught TypeError: Cannot read property 'dataAdapter' of undefined #61973
Hi,
i already search the forum, but unfortunately i found nothing that help me.
i try jqwidgets to maybe use it but i can’t even put a datagrid in a page.
please help me.
this the code in my index.php file
<link rel="stylesheet" href="js/jqwidgets/styles/jqx.base.css" type="text/css" /> <script type="text/javascript" src="http://code.jquery.com/jquery-1.11.1.js"></script> <script type="text/javascript" src="js/jqwidgets/jqxcore.js"></script> <script type="text/javascript" src="js/jqwidgets/jqxdata.js"></script> <script type="text/javascript" src="js/jqwidgets/jqxbuttons.js"></script> <script type="text/javascript" src="js/jqwidgets/jqxscrollbar.js"></script> <script type="text/javascript" src="js/jqwidgets/jqxmenu.js"></script> <script type="text/javascript" src="js/jqwidgets/jqxlistbox.js"></script> <script type="text/javascript" src="js/jqwidgets/jqxdropdownlist.js"></script> <script type="text/javascript" src="js/jqwidgets/jqxgrid.js"></script> <script type="text/javascript" src="js/jqwidgets/jqxgrid.selection.js"></script> <script type="text/javascript" src="js/jqwidgets/jqxgrid.columnsresize.js"></script> <script type="text/javascript" src="js/jqwidgets/jqxgrid.filter.js"></script> <script type="text/javascript" src="js/jqwidgets/jqxgrid.sort.js"></script> <script type="text/javascript" src="js/jqwidgets/jqxgrid.pager.js"></script> <script type="text/javascript" src="js/jqwidgets/jqxgrid.grouping.js"></script> <script type="text/javascript"> $(document).ready(function () { // prepare the data var source = { datatype: "json", datafields: [ { name: 'Login', type: 'string'}, { name: 'Password', type: 'string'}, { name: 'Fonction', type: 'string'} ], url: 'users.data.php', cache: false }; var dataAdapter = new $.jqx.dataAdapter(source); $("#jqxgrid").jqxGrid( { source: dataAdapter, theme: 'classic', columns: [ { text: 'Login', datafield: 'Login', width: 250}, { text: 'Password', datafield: 'Password', width: 150 }, { text: 'Fonction', datafield: 'Fonction', width: 180 } ] }); }); </script> <div id="jqxgrid"></div>
i read in a similar topic that if i had this error message, it’s because jqxdata.js was not load when i call this var dataAdapter = new $.jqx.dataAdapter(source); but i don’t know what to do to solve this issue
thanksNovember 3, 2014 at 7:06 am Uncaught TypeError: Cannot read property 'dataAdapter' of undefined #62029Hello sebmic38,
Please, check whether the scripts paths are referred correctly in index.php file. Another possible problem is the reference to the jQuery Framework. Have you tried with such hosted on your server?
Best Regards,
NadezhdajQWidgets team
http://www.jqwidgets.com/Hi Nadzhda ,
i am also getting the same error. I am using the latest version of the jqxwidgets , the scripts paths are referred correctly but still facing the same error. can you please help.
Regards,
NishchalHi Nishchal,
Please make sure you have included a reference to the file jqxdata.js. If the issue persists, could you, please, share a jsEditor example or a code snippet that we can test to reproduce the error you are getting?
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.