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
Grid shows no data
02/03/2011
20:09
Avatar
dranney
Member
Members
Forum Posts: 8
Member Since:
02/03/2011
sp_UserOfflineSmall Offline

I'm trying to load a json string into my grid, but no data shows up and the pager shows 0 rows.  Here's my setup:

<html>
<head>
<title>AMAC Metrics &amp; Events</title>
<!--<link type="text/css" href="static/styles/main.css" rel="stylesheet">-->
<link type="text/css" href="static/styles/dark-hive/jquery-ui-1.8.4.custom.css" rel="stylesheet" />
<link type="text/css" href="static/styles/ui.jqgrid.css" rel="stylesheet" />
<script type="text/javascript" src="static/scripts/jquery-1.5.1.js"></script>
<script type="text/javascript" src="static/scripts/jquery-ui-1.8.4.custom.min.js"></script>
<script type="text/javascript" src="static/scripts/grid.locale-en.js"></script>
<script type="text/javascript" src="static/scripts/jquery.jqGrid.min.js"></script>
</head>
<body>
<table id="rowed3"></table>
<div id="prowed3"></div>
<br />
<script type="text/javascript">
jQuery("#rowed3").jqGrid({
    url:'event/getList',
 datatype: "json",
 jsonReader : {repeatitems: false, id: "0"},
    colNames:['Source Asset','Host', 'Port', 'Status Code','Timestamp','Data Type','Data'],
    colModel:[
     {name:'sourceAsset',index:'sourceAsset', width:150},
     {name:'host',index:'host', width:100,sortable:false, editable:true},
     {name:'port',index:'port', width:100,sortable:false, editable:true},
     {name:'statusCode',index:'statusCode', width:150, editable:true},
     {name:'data',index:'data', width:100, sortable:false, editable:true},  
     {name:'dataType',index:'dataType', width:100, editable:true},  
     {name:'timestamp',index:'timestamp', width:200, editable:true}
    ],
    rowNum:10,
    rowList:[10,20,30],
    pager: '#prowed3',
    sortname: 'sourceAsset',
    viewrecords: true,
    sortorder: "desc",
 caption: "123"
});
jQuery("#rowed3").jqGrid('navGrid',"#prowed3",{edit:false,add:false,del:false});
</script>
</body>
</html>

the json string is:

{ "sourceAsset" : "test" , "host" : "localhost" , "port" : 8080 , "statusCode" : "ERROR" , "data" : 0.0 , "dataType" : "NA" , "timestamp" : 1298986463617}

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
69 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