Author Topic: Sample code to display grid not working  (Read 75 times)

stendle

  • Newbie
  • *
  • Posts: 4
    • View Profile
Sample code to display grid not working
« on: February 03, 2020, 03:21:16 pm »
We have downloaded pqGrid for evaluation, and also taken sample example from your site to display a Grid.

We have included the necessary js and css files but when we run it we get an undefined pq error.

The files we used and the error are in the Attached file.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 4315
    • View Profile
Re: Sample code to display grid not working
« Reply #1 on: February 03, 2020, 04:48:29 pm »
pq is undefined error means your pqgrid dependencies files are missing / not included in the page.

Please check the correctness of script file paths.

stendle

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Sample code to display grid not working
« Reply #2 on: February 04, 2020, 02:14:12 pm »
These  files we are including. Are we missing some files?

<script src="/CxApp/assets/global/plugins/jquery.min.js" type="text/javascript"></script>
<link type="text/css" href="/CxApp/css/jquery-ui.css" rel="stylesheet"/>
<script type="text/javascript" src="/CxApp/js/jquery-ui.min.js"></script>
<link type="text/css" href="/CxApp/css/pqgrid.min.css" rel="stylesheet"/>
<link type="text/css" href="/CxApp/css/pqgrid.ui.min.css" rel="stylesheet"/>
<link type="text/css" href="/CxApp/css/pqgrid.css" rel="stylesheet"/>
<script type="text/javascript" src="/CxApp/js/pqgrid.min.js"></script>
<script type="text/javascript" src="/CxApp/js/pq-localize-en.js"></script>
<script type="text/javascript" src="/CxApp/js/pqtouch.min.js"></script>
<script type="text/javascript" src="/CxApp/js/jszip.min.js"></script>
<script type="text/javascript" src="/CxApp/js/jszip-utils.min.js"></script>
<script type="text/javascript" src="/CxApp/js/jquery.resize.js"></script>

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 4315
    • View Profile
Re: Sample code to display grid not working
« Reply #3 on: February 04, 2020, 03:59:29 pm »
From where have you downloaded evaluation version and which version number is it?

Look out for 404 errors in the browser console.

Otherwise I guess you have downloaded free version i.e., v2.4.0 ( in which there is no pq namespace ) but trying to follow Pro examples.

Please follow the examples here for free version.

https://paramquery.com/demos
« Last Edit: February 04, 2020, 04:20:34 pm by paramvir »

stendle

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Sample code to display grid not working
« Reply #4 on: February 11, 2020, 06:58:04 pm »
We have manage to get the basic flow of launching the grid working.
Thanks for your Guidance.