CodeIgniter Forums
phpGrid in CI Error - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: phpGrid in CI Error (/showthread.php?tid=61101)



phpGrid in CI Error - El Forum - 09-17-2014

[eluser]dhall[/eluser]
I am trying to find a really good datagrid with lots of features; Search, Sorting, In-line Editing, Export to Excel, Hidden columns, Validation, etc.
The one I like so far is phpGrid but am getting an error.
Integrating it with CI I followed the below instructions which appeared to work mostly but am getting the following error. My page loads just find but the table does not show.

Error:
TypeError: jQuery(...).jqGrid is not a function
loadtext:"Loading phpGrid Lite..."

Install instructions:
http://stackoverflow.com/questions/11625458/integrate-phpgrid-with-codeigniter

I am still new to this whole development thing so any ideas how to fix would be great
If you know of an easier/better grid to use I am open to change.

Thanks!


phpGrid in CI Error - El Forum - 09-17-2014

[eluser]CroNiX[/eluser]
I don't know anything about that plugin, but according to the message you aren't loading the plugin itself so the functions don't exist. This is usually done in the head of the document, right after you include jQuery itself.


phpGrid in CI Error - El Forum - 09-17-2014

[eluser]dhall[/eluser]
It appears to be loading the jqgrid plugin in the middle of my page.
According to Firebug Script:
Code:
<head>stuff... other jquery calls used elsewhere... stuff</head>

menu bar

<body>stuff... jqgrid setup... stuff... trying to call jqgid</body>

Is this okay or does it need to be at the top of the page?
Thanks again and sorry for the dumb questions.


phpGrid in CI Error - El Forum - 09-17-2014

[eluser]CroNiX[/eluser]
I'm sorry, I really don't know as I've not used that plugin. I usually keep all javascript in the head of the document. Jquery goes first, all plugins go next, and then the code to actually use/assign the plugins to elements go last.

I think the order I mentioned is more important than where in the page they are located.