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
08/10/2009
13:07
Avatar
Jay
Guest
Guests

We are trying to use the jqgrid and having difficulty in using the xml format generated by the Oracle stored procedure. It is displaying the grid but without any contents.

Help !!!

HTML/JS Code

<!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" href="/apps/spm/spm_main.css" type="text/css">
<link rel="stylesheet" type="text/css" media="screen" href="/apps/spm/jquery/jqgrid/css/jquery-ui-1.7.2.custom.css" />
<link rel="stylesheet" type="text/css" media="screen" href="/apps/spm/jquery/jqgrid/css/ui.jqgrid.css" />
<link rel="stylesheet" type="text/css" media="screen" href="/apps/spm/jquery/jqgrid/css/jquery.searchFilter.css" />
<script src="/apps/spm/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
<script src="/apps/spm/jquery/jqgrid/js/i18n/grid.locale-en.js" type="text/javascript"></script>
<script src="/apps/spm/jquery/jqgrid/js/jquery.jqGrid.js" type="text/javascript"></script>
<script type="text/javascript">
   $().ready(function ()
   {
      $("#list").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'
      });
   });
   $("list").navGrid('#pager',{edit:false,add:false,del:false});
</script>
</head>
<body>
<h4 align="center">Manage Shipping Methods</h4>
<table id="list"></table>
<div id="pager" class="scroll"></div>
</body>
</html>

Generated XML by URL spm_preq_sm_list_xml

BODY{font:x-small 'Verdana';margin-right:1.5em} .c{cursor:hand} .b{color:red;font-family:'Courier New';font-weight:bold;text-decoration:none} .e{margin-left:1em;text-indent:-1em;margin-right:1em} .k{margin-left:1em;text-indent:-1em;margin-right:1em} .t{color:#990000} .xt{color:#990099} .ns{color:red} .dt{color:green} .m{color:blue} .tx{font-weight:bold} .db{text-indent:0px;margin-left:1em;margin-top:0px;margin-bottom:0px;padding-left:.3em;border-left:1px solid #CCCCCC;font:small Courier} .di{font:small Courier} .d{color:blue} .pi{color:blue} .cb{text-indent:0px;margin-left:1em;margin-top:0px;margin-bottom:0px;padding-left:.3em;font:small Courier;color:#888888} .ci{font:small Courier;color:#888888} PRE{margin:0px;display:inline}<!-- function f(e){ if (e.className=="ci"){if (e.children(0).innerText.indexOf("\\n")>0) fix(e,"cb");} if (e.className=="di"){if (e.children(0).innerText.indexOf("\\n")>0) fix(e,"db");} e.id=""; } function fix(e,cl){ e.className=cl; e.style.display="block"; j=e.parentElement.children(0); j.className="c"; k=j.children(0); k.style.visibility="visible"; k.href="#"; } function ch(e){ mark=e.children(0).children(0); if (mark.innerText=="+"){ mark.innerText="-"; for (var i=1;i<e.children.length;i++) e.children(i).style.display="block"; } else if (mark.innerText=="-"){ mark.innerText="+"; for (var i=1;i<e.children.length;i++) e.children(i).style.display="none"; }} function ch2(e){ mark=e.children(0).children(0); contents=e.children(1); if (mark.innerText=="+"){ mark.innerText="-"; if (contents.className=="db"||contents.className=="cb") contents.style.display="block"; else contents.style.display="inline"; } else if (mark.innerText=="-"){ mark.innerText="+"; contents.style.display="none"; }} function cl(){ e=window.event.srcElement; if (e.className!="c"){e=e.parentElement;if (e.className!="c"){return;}} e=e.parentElement; if (e.className=="e") ch(e); if (e.className=="k") ch2(e); } function ex(){} function h(){window.status=" ";} document.onclick=cl; -->

  <?xml version="1.0" encoding="utf-8" ?>
- <rows>
  <page>1</page>
  <total>2</total>
  <records>16</records>
- <row id="33444">
  <cell>40</cell>
- <cell>
<![CDATA[
AIR

  ]]> f(clean);
  </cell>
- <cell>
<![CDATA[
3

  ]]> f(clean);
  </cell>
  <cell>18-AUG-09</cell>
- <cell>
<![CDATA[   ]]> f(clean);
  </cell>
  <cell />
  </row>
- <row id="33430">
  <cell>10</cell>
- <cell>
<![CDATA[
FEDEX

  ]]> f(clean);
  </cell>
- <cell>
<![CDATA[
3

  ]]> f(clean);
  </cell>
  <cell>18-AUG-09</cell>
- <cell>
<![CDATA[
3

  ]]> f(clean);
  </cell>
  <cell>18-AUG-09</cell>
  </row>
- <row id="33440">
  <cell>11</cell>
- <cell>
<![CDATA[
FEDEX 2DAY

  ]]> f(clean);
  </cell>
- <cell>
<![CDATA[
3

  ]]> f(clean);
  </cell>
  <cell>18-AUG-09</cell>
- <cell>
<![CDATA[   ]]> f(clean);
  </cell>
  <cell />
  </row>
- <row id="33441">
  <cell>12</cell>
- <cell>
<![CDATA[
FEDEX EXPRESS SAVER

  ]]> f(clean);
  </cell>
- <cell>
<![CDATA[
3

  ]]> f(clean);
  </cell>
  <cell>18-AUG-09</cell>
- <cell>
<![CDATA[   ]]> f(clean);
  </cell>
  <cell />
  </row>
- <row id="33442">
  <cell>13</cell>
- <cell>
<![CDATA[
FEDEX OVERNIGHT

  ]]> f(clean);
  </cell>
- <cell>
<![CDATA[
3

  ]]> f(clean);
  </cell>
  <cell>18-AUG-09</cell>
- <cell>
<![CDATA[   ]]> f(clean);
  </cell>
  <cell />
  </row>
- <row id="33443">
  <cell>70</cell>
- <cell>
<![CDATA[
RAIL

  ]]> f(clean);
  </cell>
- <cell>
<![CDATA[
3

  ]]> f(clean);
  </cell>
  <cell>18-AUG-09</cell>
- <cell>
<![CDATA[
3

  ]]> f(clean);
  </cell>
  <cell>18-AUG-09</cell>
  </row>
- <row id="33446">
  <cell>60</cell>
- <cell>
<![CDATA[
SEA

  ]]> f(clean);
  </cell>
- <cell>
<![CDATA[
3

  ]]> f(clean);
  </cell>
  <cell>18-AUG-09</cell>
- <cell>
<![CDATA[   ]]> f(clean);
  </cell>
  <cell />
  </row>
- <row id="33445">
  <cell>50</cell>
- <cell>
<![CDATA[
TRUCK

  ]]> f(clean);
  </cell>
- <cell>
<![CDATA[
3

  ]]> f(clean);
  </cell>
  <cell>18-AUG-09</cell>
- <cell>
<![CDATA[   ]]> f(clean);
  </cell>
  <cell />
  </row>
- <row id="33447">
  <cell>22</cell>
- <cell>
<![CDATA[
UPS 2ND DAY AIR

  ]]> f(clean);
  </cell>
- <cell>
<![CDATA[
3

  ]]> f(clean);
  </cell>
  <cell>18-AUG-09</cell>
- <cell>
<![CDATA[   ]]> f(clean);
  </cell>
  <cell />
  </row>
- <row id="33448">
  <cell>23</cell>
- <cell>
<![CDATA[
UPS 3 DAY SELECT

  ]]> f(clean);
  </cell>
- <cell>
<![CDATA[
3

  ]]> f(clean);
  </cell>
  <cell>18-AUG-09</cell>
- <cell>
<![CDATA[   ]]> f(clean);
  </cell>
  <cell />
  </row>
- <row id="33449">
  <cell>24</cell>
- <cell>
<![CDATA[
UPS EXPRESS CRITICAL

  ]]> f(clean);
  </cell>
- <cell>
<![CDATA[
3

  ]]> f(clean);
  </cell>
  <cell>18-AUG-09</cell>
- <cell>
<![CDATA[   ]]> f(clean);
  </cell>
  <cell />
  </row>
- <row id="33431">
  <cell>20</cell>
- <cell>
<![CDATA[
UPS GROUND

  ]]> f(clean);
  </cell>
- <cell>
<![CDATA[
3

  ]]> f(clean);
  </cell>
  <cell>18-AUG-09</cell>
- <cell>
<![CDATA[
3

  ]]> f(clean);
  </cell>
  <cell>18-AUG-09</cell>
  </row>
- <row id="33434">
  <cell>21</cell>
- <cell>
<![CDATA[
UPS NEXT DAY AIR

  ]]> f(clean);
  </cell>
- <cell>
<![CDATA[
3

  ]]> f(clean);
  </cell>
  <cell>18-AUG-09</cell>
- <cell>
<![CDATA[
3

  ]]> f(clean);
  </cell>
  <cell>18-AUG-09</cell>
  </row>
- <row id="33450">
  <cell>30</cell>
- <cell>
<![CDATA[
USPS

  ]]> f(clean);
  </cell>
- <cell>
<![CDATA[
3

  ]]> f(clean);
  </cell>
  <cell>18-AUG-09</cell>
- <cell>
<![CDATA[   ]]> f(clean);
  </cell>
  <cell />
  </row>
- <row id="33452">
  <cell>32</cell>
- <cell>
<![CDATA[
USPS EXPRESS

  ]]> f(clean);
  </cell>
- <cell>
<![CDATA[
3

  ]]> f(clean);
  </cell>
  <cell>18-AUG-09</cell>
- <cell>
<![CDATA[   ]]> f(clean);
  </cell>
  <cell />
  </row>
- <row id="33451">
  <cell>31</cell>
- <cell>
<![CDATA[
USPS PRIORITY MAIL

  ]]> f(clean);
  </cell>
- <cell>
<![CDATA[
3

  ]]> f(clean);
  </cell>
  <cell>18-AUG-09</cell>
- <cell>
<![CDATA[   ]]> f(clean);
  </cell>
  <cell />
  </row>
  </rows>
08/10/2009
13:58
Avatar
Rumen[Trirand]
Moderator
Members

Moderators
Forum Posts: 81
Member Since:
08/10/2009
sp_UserOfflineSmall Offline

Alright, so jqGrid does not really depend on the database (MySql, MS SQL, Oracle, etc) so from what I can tell this is an XML formatting issue.

You can try static XML formatting until you get it right, then froce Oracle produce the type of XML jqGrid accepts.

R.

Trirand ASP.NET WebForms & MVC components based on jQuery & ThemeRoller

http://www.trirand.net

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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