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
How to actually access userdata - nothing seems to work - example wanted please
26/01/2012
21:58
Avatar
chrisisbd
UK
Member
Members
Forum Posts: 8
Member Since:
25/01/2012
sp_UserOfflineSmall Offline

I'm trying to access some userdata set by a PHP script.

The XML data I'm sending is:-

<rows>
    <page>1</page>
    <total>1</total>
    <records>5</records>
    <userdata name="Column1">id</userdata>
    <userdata name="Column2">Date</userdata>
    <userdata name="Column3">Description of item</userdata>
    <userdata name="Column4">Credit Amt</userdata>
    <userdata name="Column5">Debit Amt</userdata>
    <row id='1'><cell>1</cell><cell>2012-01-01</cell>....

    ....

The table data is arriving OK in jqGrid but I can't seem to find any way to read that userdata, I've tried lots of different things as described in the documentation but nothing works.  Can someone show me a simple example please.

27/01/2012
01:44
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

Look at the place in the documentation. Try to use

var myUserData = $("#grid_id").getGridParam('userData');
alert(myUserData.Column1);

or try to use the as additional option userDataOnFooter: true of jqGrid.

Best regards
Oleg 

27/01/2012
15:50
Avatar
chrisisbd
UK
Member
Members
Forum Posts: 8
Member Since:
25/01/2012
sp_UserOfflineSmall Offline

OK, thanks for the pointers.

I think my basic problem was a misunderstanding of how jqGrid works.  I'm not a JavaScript expert by any means at all, my background is C/C++ with a little Python and then PHP thrown in for luck.  I need to do some basic learning about JavaScript classes and object!  🙂

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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