Forum


16:35

26/07/2008

New to jqgrid so this is a dumb question I'm sure. I can't get the local array example to work -- no display or error in Firebug and all the .js files are coming through...I'm not sure how much of the script goes into a "ready" function but I've tried experimenting and got nowhere...can someone see what's wrong? thanks!
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>jqGrid Demos</title>
<!-- In head section we should include the style sheet for the grid -->
<link rel="stylesheet" type="text/css" media="screen" href="../js/jqGrid/themes/sand/grid.css" />
<!-- Of course we should load the jquery library -->
<script src="../js/jqGrid/jquery.js" type="text/javascript"></script>
<!-- and at end the jqGrid Java Script file -->
<script src="../js/jqGrid/jquery.jqGrid.js" type="text/javascript">
<script type = "text/javscript">
$(document).ready(function(){
$("#list4").jqGrid({
datatype: "local",
height: 250,
colNames:['County','Government', 'Year', 'Records'],
colModel:[
{name:'county', width:90},
{name:'entity', width:100},
{name:'year', width:80, align:"right",sorttype:"float"},
{name:'count', width:80, align:"right",sorttype:"float"}
],
caption: "Local salary data added to salaries table"
});
var mydata = [
{county:"Putnam",entity:"Carmel",year:"2007",count:"325"},
{county:"Rockland",entity:"Hillburn",year:"2008",count:"16"},
{county:"Westchester",entity:"Yonkers schools",year:"2008",count:"4285"}];
for(var i=0;i<=mydata.length;i++)
$("#list4").addRowData(i+1,mydata[i]);
});
</script>
</head>
<body>
<table id="list4" class="scroll" cellpadding="0" cellspacing="0"></table>
</body>
</html>
09:40

Moderators
30/10/2007

Check the CSS files
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
02:03

Moderators
30/10/2007

Hello,
Humm this is very strange. Could you please test whitout to use adding data. I mean disable this piece of code
var mydata = [
{county:"Putnam",entity:"Carmel",year:"2007",count:"325"},
{county:"Rockland",entity:"Hillburn",year:"2008",count:"16"},
{county:"Westchester",entity:"Yonkers schools",year:"2008",count:"4285"}];
for(var i=0;i<=mydata.length;i++)
$(”#list4″).addRowData(i+1,mydata[i]);
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
07:08

26/07/2008

ok that helps that you can't see anything wrong. I'm looking at the js files and seeing some possible line break problems; maybe I just need to upload them again
http://www.tjnnews.com/salary/.....ry_sum.htm
I'll tell you when I figured it out
07:25

Moderators
30/10/2007

If I set the debugger to the first line of jquery.js it does not stop.
Yes there is a something strange here. Please to be ensure that
all is ok. First load jquery and put something simple and see if this
work. Then step by step include the modules
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
Most Users Ever Online: 715
Currently Online:
63 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66