Serguei Fedorov
Serguei Fedorov

Reputation: 7913

jqGrid not available even though imported properly

I am having a problem getting the jqGrid to be recognized by jQuery. For some reason despite having imported the library

<script type="text/javascript" src="js/jquery.jqGrid.min.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.21/jquery-ui.js"></script>

I can verify that the library is imported correctly and I can click on it and see it in Chrome. Any idea why I cannot use the library? When I try

 JQuery("#table").jqGrid...

it doesn't work, nor does it show up as one of the functions available.

Any help is really appreciated!

Upvotes: 2

Views: 285

Answers (1)

Musa
Musa

Reputation: 97672

jQuery should be first then jQueryUI then jqGrid, this is because jqgrid depends in jquery an djqueryui so they need to be loaded before.

I think you also need i18n/grid.locale-en.js loaded before too

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.js">   </script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.21/jquery-ui.js"></script>
<script type="text/javascript" src="js/i18n/grid.locale-en.js"></script>
<script type="text/javascript" src="js/jquery.jqGrid.min.js"></script>

Upvotes: 2

Related Questions