Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
local data array example
25/07/2008
16:35
Avatar
tim_hendo
Member
Members
Forum Posts: 3
Member Since:
26/07/2008
sp_UserOfflineSmall Offline

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>

26/07/2008
09:40
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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.

28/07/2008
12:33
Avatar
tim_hendo
Member
Members
Forum Posts: 3
Member Since:
26/07/2008
sp_UserOfflineSmall Offline

tony said:

Check the CSS files


I'm including the sand css file and Firebug shows it's there and linking to all the image files. Or do I need to include all the CSS files in the first example -- that's the only one where I see a fully formed page as an example

29/07/2008
02:03
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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.

29/07/2008
07:08
Avatar
tim_hendo
Member
Members
Forum Posts: 3
Member Since:
26/07/2008
sp_UserOfflineSmall Offline

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

29/07/2008
07:25
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
36 Guest(s)

Currently Browsing this Page:
1 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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information