Forum

July 10th, 2011
You must be logged in to post Login Register

Search Forums:


 






Problems getting jqgrid to show

UserPost

14:09
12/01/2012


howster

New Member

posts 1

Post edited 14:11 – 12/01/2012 by howster


Hi Guys,

I'm probably overlooking something simple. Anyway I am trying to get the Live Data Manipulation > Navigator demo working at http://trirand.com/blog/jqgrid…..qgrid.html


I downloaded jqgrid yesterday and uploaded it to my site. Here is the code I'm using to get this working:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
  <head>
    <title>jqGrid PHP Demo</title>
 
<link rel="stylesheet" type="text/css" media="screen" href="themes/redmond/jquery-ui-1.8.2.custom.css" />
<link rel="stylesheet" type="text/css" media="screen" href="themes/ui.jqgrid.css" />
<link rel="stylesheet" type="text/css" media="screen" href="themes/ui.multiselect.css" />

<script src="js/jquery.min.js" type="text/javascript"></script>
<script src="js/jquery-ui-1.8.2.custom.min.js" type="text/javascript"></script>

<script src="js/jquery.layout.js" type="text/javascript"></script>
<script src="js/i18n/grid.locale-en.js" type="text/javascript"></script>
<script type="text/javascript">
    $.jgrid.no_legacy_api = true;
    $.jgrid.useJSON = true;
</script>
<script src="js/ui.multiselect.js" type="text/javascript"></script>
<script src="js/jquery.jqGrid.min.js" type="text/javascript"></script>
<script src="js/jquery.tablednd.js" type="text/javascript"></script>
<script src="js/jquery.contextmenu.js" type="text/javascript"></script>

    <script type="text/javascript">

        jQuery(document).ready(function () {
   jQuery("#navgrid").jqGrid({ url:'editing.php?q=1', datatype: "xml", colNames:['Inv No','Date', 'Client', 'Amount','Tax','Total','Closed','Ship via','Notes'], colModel:[ {name:'id',index:'id', width:55,editable:false,editoptions:{readonly:true,size:10}}, {name:'invdate',index:'invdate', width:80,editable:true,editoptions:{size:10}}, {name:'name',index:'name', width:90,editable:true,editoptions:{size:25}}, {name:'amount',index:'amount', width:60, align:"right",editable:true,editoptions:{size:10}}, {name:'tax',index:'tax', width:60, align:"right",editable:true,editoptions:{size:10}}, {name:'total',index:'total', width:60,align:"right",editable:true,editoptions:{size:10}}, {name:'closed',index:'closed',width:55,align:'center',editable:true,edittype:"checkbox",editoptions:{value:"Yes:No"}}, {name:'ship_via',index:'ship_via',width:70, editable: true,edittype:"select",editoptions:{value:"FE:FedEx;TN:TNT"}}, {name:'note',index:'note', width:100, sortable:false,editable: true,edittype:"textarea", editoptions:{rows:"2",cols:"20"}} ], rowNum:10, rowList:[10,20,30], pager: '#pagernav', sortname: 'id', viewrecords: true, sortorder: "desc", caption:"Navigator Example", editurl:"someurl.php", height:210 }); jQuery("#navgrid").jqGrid('navGrid','#pagernav', {}, //options {height:280,reloadAfterSubmit:false}, // edit options {height:280,reloadAfterSubmit:false}, // add options {reloadAfterSubmit:false}, // del options {} // search options );
    });
    </script>

  </head>
  <body>
<table id="navgrid"></table>
    </body>
</html>

….this returns blank.

If I use the source code from http://www.ok-soft-gmbh.com/jq…..ince81.htm (a random sample grid) I can get the grid working fine suggesting I've all the right files and filepaths set.


Any idea how to get the above working please?


THANKS


About the jQuery Grid Plugin – jqGrid forum

Most Users Ever Online:

157


Currently Online:

steve_o

65 Guests

Forum Stats:

Groups: 1

Forums: 7

Topics: 9583

Posts: 28756

Membership:

There are 10106 Members

There have been 448 Guests

There is 1 Admin

There are 2 Moderators

Top Posters:

OlegK – 1157

markw65 – 179

kobruleht – 144

phicarre – 126

YamilBracho – 124

Renso – 118

Administrators: admin (56 Posts)

Moderators: tony (6999 Posts), Rumen[Trirand] (81 Posts)




Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information