Forum


22:39

19/03/2010

Hi,
I'm using an edittype:select with editoptions{value:'0:Op1;1:Op2'} and when grid data is loaded it will display '0', '1', instead of 'Op1', 'Op2'. It will only display the name if I edit the cell. When I add a new row it correctly displays the drop down, but once it reloads the grid it will display the '0'/'1' values instead of the names.
Any suggestions?
01:08

04/11/2009

02:41

04/11/2009

good question …
I am guessing that Tony expects people store the display value in the database for ease when using the search text entered, when I (like you) would rather store the key and have jqGrid translate the display on the client side and let us write code to translate the 'Search Text' back to the key value for look up. Maybe Tony can add an option to handle both ?
tim
10:33

19/03/2010

Ah, I see what you're saying about the search text. It really seems like a bug, to me though. If you send it values from the DB, and then edit the post, it will show you the name when your finished editing it. It's like some kind of event is triggering that subs the value for the name, but that trigger is only happening after you edit the post.
I guess if there's no known work around for now I could digg around with Firebug...
15:34

04/04/2010

I was looking for the same thing and I ended up hacking the jqgrid code to get it to show the value instead of the id. However I just came across this post which seems to be the real solution. I haven't tried it yet but it seems to be what both of us were looking for.
/blog/?page_id=393/help/select-boxes-view-in-grid/&value=select%20value&type=1&include=1&search=1&ret=all
12:37

Moderators
30/10/2007

Hello,
Yes - formatter select is your solution. It is good first to search the docs
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.
Most Users Ever Online: 715
Currently Online:
69 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