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
What are needed in colModel, xmlReader, etc?
02/02/2013
18:08
Avatar
PeterLewis
New Member
Members
Forum Posts: 2
Member Since:
02/02/2013
sp_UserOfflineSmall Offline

The data returned by my web method is as follows:

<?xml version="1.0" encoding="utf-8"?>

<ArrayOfGroup xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="

http://www.w3.org/2001/XMLSchema" xmlns="http://thingss.org/"&gt;

  <Group>

    <RoleId>b65440c2-eb0b-4467-bb15-40e6f0836177</RoleId>

    <RoleName>Admin</RoleName>

    <Description>Administrators</Description>

  </Group>

  <Group>

    <RoleId>b65440c2-eb0b-4467-bb15-40e6f0836177</RoleId>

    <RoleName>Staff</RoleName>

    <Description>All Employees</Description>

  </Group>

</ArrayOfGroup>

I have spent many many hours but still could not get the data to show in the grid.  I can confirm that the data is received based on the  function I have in the loadComplete option.  Can someone help me with what I need to put to get it to work.  The code below is all messed up by the editor and I can't show it clearly.  How must I code the colModel, xmlReader and any other options?

grid = $(

  grid.jqGrid({url:

  mtype:

  datatype:

  colNames: [

  colModel: [{ name:

             { name:

  xmlReader: { root:

  rowNum: 10,

  autowidth:

'RoleName', 'Description'], 'Name', index: 'Group', width: 50, xmlmap: "RoleName" }, 'Description', index: 'Description', width: 100, xmlmap: "Description" }], "ArrayOfGroup", row:"Group" },  /* ???? */true,   loadComplete: function () { alert("Loaded!"); }'#roles'); 'WebService.asmx/GetAllGroups', "POST", "xml", /*data: [ {Name: "abc", Description: "def"}, {Name: "qqq", Description: "drrref"} ],*/

Thanks.


 

02/02/2013
18:25
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

All what you need to know is here

Regards

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.

02/02/2013
18:27
Avatar
PeterLewis
New Member
Members
Forum Posts: 2
Member Since:
02/02/2013
sp_UserOfflineSmall Offline

I found the documentation in the Data Manipulation section, and I have got my grid to work. 

The critical item was setting repeatitems in xmlReader to false.

Thanks.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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