Forum
13:46
14/02/2009
Hi Tony,
Currently I haven't figured out a way to obtain the value from a cell easily when using advanced edittypes such as a select.
I would like to suggest if you could add the property "value" to all the <td>cells then we could easily obtain the set value that was selected using standard jQuery function val().
Right now the <td> entry looks like this for a cell:
<td title='One'>One</td>
If you added the value property then for a select type it could show something like this:
<td title='One' value='1'>One</td>
Please let me know what you think (unless you know of an easier way to obtain these values?).
Thanks!
02:22
Moderators
30/10/2007
Hello,
Also I see you have difficulties to do that, but my question is?
Haw we can obtain this value ?
Also here is a common approach. Get the values from editoption of the select - convert this string to array so that you have key->value. You should see this array in the jQuery scope, or make it global. After that is easy to do what you want. Get key from value is easy job for you.
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.
07:09
16/02/2009
Isn't the point of having a key that it's the one thing we can expect to be unique? The value/name isn't necessarily unique, and in many cases it's user input. I agree that a user shouldn't -- and perhaps should be allowed to -- create two items with the same name, but I think it'll happen and there's a reason select-elements are built like they are.
It's a solution to do lookups the other way, but not sure if it's very bullet proof 🙂
I also posted in "Help"-forum that when using GridToForm the key is not sent there either. This is something I use to store data on the server, and I want to store the key of course since it's used for relations. I'm currently working around it by doing a lookup for the ID on the server side code before updating the DB.
Most Users Ever Online: 715
Currently Online:
48 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