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
jqGrid and Oracle Stored Procedure - Unable to display the grid
13/11/2009
16:34
Avatar
Jay
Guest
Guests

I am trying out the the latest version of jqGrid (3.6) to display the contents of the table using the xml format by calling the Oracle Stored Procedure in the url tag that generates the following output. But, the grid is not being displayed. I am not getting any javascript error (the path to the files are correct).

I have attached the HTML Source and the generated XML from the Oracle Stored Procedure.

Am i missing anything?

Help!!!

===========
HTML Source
===========

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Manage Shipping Methods</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="StyleSheet" type="text/css" href="spm_main.css">
<link rel="stylesheet" type="text/css" media="screen" href="jquery-ui-1.7.2.custom.css" />
<link rel="stylesheet" type="text/css" media="screen" href="ui.jqgrid.css" />
<link rel="stylesheet" type="text/css" media="screen" href="jquery.searchFilter.css" />

<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript" src="jquery-ui-1.7.2.custom.min.js"></script>
<script type="text/javascript" src="jquery.layout.js"></script>
<script type="text/javascript" src="grid.locale-en.js"></script>
<script type="text/javascript" src="jqGrid.min.js"></script>
<script type="text/javascript" src="ui.multiselect.js"></script>

<script type="text/javascript">
jQuery().ready(function ()
{
jQuery("#ShipMethodList").jqGrid({
url:'spm_preq_sm_list_xml',
datatype: "xml",
colNames:['Seq','Description', 'Entered By', 'Entered Date','Updated By','Updated Date'],
colModel:[ {name:'seq',index:'seq', width:50},
{name:'ShipMethod',index:'ShipMethod', width:100},
{name:'EnteredBy',index:'EnteredBy', width:100},
{name:'EnteredDate',index:'EnteredDate', width:80, align:"center"},
{name:'UpdatedBy',index:'UpdatedBy', width:100, align:"right"},
{name:'UpdatedDate',index:'UpdatedDate', width:80,align:"center"} ],
pager: $('#pager'),
rowNum:10,
autowidth: true,
rowList: [10,20],
viewrecords: true,
sortname: 'ShipMethod'
caption: "Shipment Methods"
});
});
$("ShipMethodList").navGrid('#pager',{edit:false,add:false,del:false});
</script>
</head>
<body>
<h4 align="center">Manage Shipping Methods</h4>
<table id="ShipMethodList"></table>
<div id="pager" class="scroll"></div>
</body>
</html>

==============================================
Generated XML from the Oracle Stored Procedure (spm_preq_sm_list_xml)
==============================================
<?xml version='1.0' encoding='utf-8'?>
<rows><page>1</page><total>2</total><records>19</records>
<row id='33444'>
<cell>40</cell>
<cell><![CDATA[AIR]]></cell>
<cell><![CDATA[3]]></cell>
<cell>18-AUG-09</cell>
<cell><![CDATA[]]></cell>
<cell></cell>
</row>

<row id='33430'>
<cell>10</cell>
<cell><![CDATA[FEDEX]]></cell>
<cell><![CDATA[3]]></cell>
<cell>18-AUG-09</cell>
<cell><![CDATA[3]]></cell>
<cell>18-AUG-09</cell>
</row>

<row id='33443'>
<cell>70</cell>
<cell><![CDATA[RAIL]]></cell>
<cell><![CDATA[3]]></cell>
<cell>18-AUG-09</cell>
<cell><![CDATA[3]]></cell>
<cell>18-AUG-09</cell>
</row>

<row id='33446'>
<cell>60</cell>
<cell><![CDATA[SEA]]></cell>
<cell><![CDATA[3]]></cell>
<cell>18-AUG-09</cell>
<cell><![CDATA[]]></cell>
<cell></cell>
</row>

<row id='34732'>
<cell>110</cell>
<cell><![CDATA[TEST 1]]></cell>
<cell><![CDATA[3]]></cell>
<cell>13-NOV-09</cell>
<cell><![CDATA[]]></cell>
<cell></cell>
</row>

<row id='34733'>
<cell>120</cell>
<cell><![CDATA[TEST 2]]></cell>
<cell><![CDATA[3]]></cell>
<cell>13-NOV-09</cell>
<cell><![CDATA[]]></cell>
<cell></cell>
</row>

<row id='34734'>
<cell>130</cell>
<cell><![CDATA[TEST 3]]></cell>
<cell><![CDATA[3]]></cell>
<cell>13-NOV-09</cell>
<cell><![CDATA[]]></cell>
<cell></cell>
</row>

<row id='33445'>
<cell>50</cell>
<cell><![CDATA[TRUCK]]></cell>
<cell><![CDATA[3]]></cell>
<cell>18-AUG-09</cell>
<cell><![CDATA[]]></cell>
<cell></cell>
</row>

<row id='33447'>
<cell>22</cell>
<cell><![CDATA[UPS 2ND DAY AIR]]></cell>
<cell><![CDATA[3]]></cell>
<cell>18-AUG-09</cell>
<cell><![CDATA[]]></cell>
<cell></cell>
</row>

<row id='33450'>
<cell>30</cell>
<cell><![CDATA[USPS]]></cell>
<cell><![CDATA[3]]></cell>
<cell>18-AUG-09</cell>
<cell><![CDATA[]]></cell>
<cell></cell>
</row>

</rows>
========================

17/11/2009
01:19
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Maybe you will need to send the appropriate header before outputting the data to grid - in PHP this is:

header("Content-type: text/xml;charset=utf-8");

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.

17/11/2009
10:49
Avatar
Jay
Guest
Guests

Changed <meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ /> tag to <meta http-equiv=”Content-Type” content=”text/xml; charset=utf-8″ />. It is just displaying the grid header and not the data.

19/11/2009
06:25
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

No I mean diffrent - when you send data back to the client before sending it from the server you should do (PHP variant)

header("Content-type: text/xml;charset=utf-8");

echo response;

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:
68 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