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
xml data not being populated
05/03/2009
15:29
Avatar
n8shaw
New Member
Members
Forum Posts: 2
Member Since:
06/03/2009
sp_UserOfflineSmall Offline

I have been trying to get jqgrid to work with an xml data set now for several hours and it just won't work. The grid shows up with the correct headers, but the data is not loaded.

I have stripped down the xml that is returned to be more simple, figuring something would make it work, but nothing has worked. Here is the code I am trying now:

var mystr = "<?xml version='1.0' encoding='utf-8'?><top><rowset><row id='1'><LOG_ID>69</LOG_ID><EVENT_ID>0</EVENT_ID><SUMMARY>Test 8</SUMMARY><LOCATION>here</LOCATION><DTSTART>dtstart</DTSTART><TRANSACTION_DATE>Transdate</TRANSACTION_DATE><MESSAGE>message</MESSAGE><SUCCESS>N</SUCCESS></row><row id='2'><LOG_ID>68</LOG_ID><EVENT_ID>0</EVENT_ID><SUMMARY>Test 7</SUMMARY><LOCATION>here</LOCATION><DTSTART>Startdate</DTSTART><TRANSACTION_DATE>Transdate</TRANSACTION_DATE><MESSAGE>Message</MESSAGE><SUCCESS>N</SUCCESS></row></rowset></top>";
            $("#logViewer").jqGrid({
                //url:'cronservlet/log',
                //datatype: 'xml',
                datatype: 'xmlstring',
                datastr : mystr,
                xmlReader: {
                  root:'rowset',
                  row:'row'
                },
                colNames:[
                    'Log ID',
                    'Event ID',
                    'Summary',
                    'Location',
                    'Start Date',
                    'Transaction Date',
                    'Message',
                    'Success'],
                colModel:[
                  {name:"logid", index:'logid', xmlmap:"LOG_ID"},
                  {name:"eventid", index:'eventid', xmlmap:"EVENT_ID"},
                  {name:"summary", index:'summary', xmlmap:"SUMMARY"},
                  {name:"location", index:'location', xmlmap:"LOCATION"},
                  {name:"dtstart", index:'dtstart', xmlmap:"DTSTART"},
                  {name:"transdate", index:'transdate', xmlmap:"TRANSACTION_DATE"},
                  {name:"message", index:'message', xmlmap:"MESSAGE"},
                  {name:"success", index:'success', xmlmap:"SUCCESS"}
                ],
                sortname: 'logid',
                sortorder: 'desc',
                rowNum: 10,
                pager: jQuery('#pager'),
                viewrecords: true,
                imgpath: 'js/jqgrid/themes/basic/images',
                caption: 'Exchange Cron Log'
            });

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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