Forum

July 12th, 2025
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
DataGrid Not Showing Data
23/02/2010
20:37
Avatar
danlewis
New Member
Members
Forum Posts: 1
Member Since:
23/02/2010
sp_UserOfflineSmall Offline

Hello - need some help - code below:

    <script type="text/javascript">
    
    jQuery(document).ready(function(){
      jQuery("#list").jqGrid({
        url:'../lib/services.php?cmd=GetMembers&groupID=1',
        datatype: 'json',
        jsonReader : {
            root:"data",
            page:"currpage",
            total:"totalpages",
            records:"totalrecords"
            },
        mtype: 'POST',
        colNames:['lastName','firstName', 'name','email'],
        colModel :[
          {name:'lastName', label:'lastName', width:150, sortable:false},
          {name:'firstName', label:'firstName', width:150, sortable:false},
          {name:'name', label:'name', width:150, sortable:false},
          {name:'email', label:'email', width:200, sortable:false}
        ],
        pager: '#pager',
        rowNum:10,
        rowList:[10,20,30],
        sortname: 'ordinal',
        sortorder: 'desc',
        viewrecords: true,
        caption: 'Hire Americas Heroes Members'
      });
    });
    </script>

and the json being fed to the control is as follows (line breaks added for readibility)

{
    totalpages: "1",
    currpage: "1",
    totalrecords: "5",
    data:[
{"id":"1","typeID":"1","lastName":"SomeLastName","firstName":"SomeFirstName","imageName":"mSomeLastName.jpg","email":"mSomeLastName@eml.com","description":"Title Etc","ordinal":"1","name":"Executive Committee"},{"id":"2","typeID":"1","lastName":"SomeLastName","firstName":"SomeFirstName","imageName":"mSomeLastName.jpg","email":"mSomeLastName@eml.com","description":"Title Etc","ordinal":"2","name":"Executive Committee"},{"id":"3","typeID":"1","lastName":"SomeLastName","firstName":"SomeFirstName","imageName":"mSomeLastName.jpg","email":"mSomeLastName@eml.com","description":"Title Etc","ordinal":"3","name":"Executive Committee"},{"id":"4","typeID":"1","lastName":"SomeLastName","firstName":"SomeFirstName","imageName":"mSomeLastName.jpg","email":"mSomeLastName@eml.com","description":"Title Etc","ordinal":"4","name":"Executive Committee"},{"id":"5","typeID":"1","lastName":"SomeLastName","firstName":"SomeFirstName","imageName":"mSomeLastName.jpg","email":"mSomeLastName@eml.com","description":"Title Etc","ordinal":"5","name":"Executive Committee"}
]}

Thanks,

24/02/2010
00:31
Avatar
lupin
Member
Members
Forum Posts: 28
Member Since:
12/02/2010
sp_UserOfflineSmall Offline

Hi,

Here's the link to docs http://www.trirand.com/jqgridw.....#json_data

Hth,

lupin

Forum Timezone: Europe/Sofia

Most Users Ever Online: 994

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