Forum


10:49

26/02/2009

Hello jgrid-friends,
i have :
php:
..
$test=”Hello”;
….
echo “<userdata>”.$test.” </userdata>”;
…..
in my grid I have:
loadComplete:function(){var hinweis = $('#kundenstamm_ed').getGridParam('userdata'); alert(hinweis);
…
I get (in alert) “null“
when I use: loadComplete:function(){var hinweis = $('#kundenstamm_ed').getGridParam('userData'); alert(hinweis);
i get (in alert) “[object Object]“
What is the difference and what is the best solution for getting my text as a serverresponce into the alert-message?
Thank you Lotte
06:39

Moderators
30/10/2007

Hello Lotte,
My simple answer is: Again refer to the docs
http://www.secondpersonplural......16ksnu.htm
Best Regards
Tony
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.
21:55

Tony, I have seen both his posts and both replies.
Your “simple” answer in the docs does not work. I too get the same error.
Did you even read his post?
He is using “getGridParam('userData');” as defined in the docs….
and getting “[object Object]” – not the value.
How does one get a footerData value (or userData value) into a variable ?
Thanks
Tripp
04:25

Moderators
30/10/2007

Hello,
Of course it is a object. You should know the name in order to obtain the value
Example:
echo “<userdata name='myname'>This is myname</userdata>”;
echo “<userdata name='username'>This is user name</userdata>”;
JS
var hinweis = $('#kundenstamm_ed').getGridParam('userData');
alert(hinweis.myname) - > This is myname
alert(hinweis.username) - > This is user name
Did you see the diffrence?
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.
Most Users Ever Online: 715
Currently Online:
47 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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66