Forum


13:06

26/01/2010

I need help on this issue as I am unable to access the value of a column whose name has a dot notation.
Has anyone got any tips on this?
I have a column whose name is document.imageUploadedR
which is populated correctly with data as the grid loads.. here is part of the json string...
When I try to access the rowData and try and access the value in that column, I get undefined.
var ret = jQuery("#documentgrid").jqGrid('getRowData',1);
alert(ret.document.imageUploadedR);
When I console.log my ret value I can see the data as document.imageUploadedR "Y"
It seems something different must be done with columns that have a dot notation. Columns without a dot notation seem to work fine!
Thanks for any help on this as I am very stuck!
15:39

Moderators
30/10/2007

Hello,
Create a object manually like this:
var ret = {"prop1″ : "value1″, "document.imageUploadedR": "value2"}
then try to alert it this vay
alert(ret.document.imageUploadedR);
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.
18:33

26/01/2010

Hi
Is there a method to convert a row in the grid into the object that you mentioned in your post?.. It would make things easier as then i can then access the data I want with the dot notation as the name for a column.
Otherwise its impossible to access values from a column which has a dot notation as its name.
thanks Tony
19:58

Moderators
30/10/2007

Hello,
I suggest you to try to acces the value this way
alert( ret["document.imageUploadedR"] );
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.
Most Users Ever Online: 715
Currently Online:
175 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