Forum
22:17
04/11/2008
My first reaction is that jqgrid is really good and has a lot of potential. Congratulations to the ones who have done so much work!
I am currently somwhat concerned because I don't care for the way it deals with keys, indexes and edittype:select. (OR it might beh that I don't know how to make it behave in a way I find acceptable.)
Consider this workflow:
I have a table in the database used to define seasons, just 2 columns:
- season_tb.season_id
- season_tb.season
Now I want to use jqgrid, inline editing, edittype:select on the season field.
So I create a list from the database {'1':'spring', '2':'summer', '3':'fall', '4':'winter'} ) On the server side I use editoptions to configure the list.
In colModel I do this:
{name:'season_id',index:'season_id',width:100,editable:true, edittype:"select",editoptions:{<?=$season_list?>}},
In order for the grid to dissplay, spring, summer, fall, and winter, is to necessary to set season_id = "spring", which is wrong.
I acknowledge that on a post "season_id = 1". However dealing with "season_id" becomes difficult and confusing. At first "season_id" = "spring" then on a post "season_id"="1". Unless you edit the row then "season_id"=" ". Which is even worse.
I find that I can make jquery do almost what I want, but there are just to many work arounds that I can't feel good about it.
Barry
07:37
Moderators
30/10/2007
Hello,
Maybe this
{name:'season_id',index:'season_id',width:100,editable:true, edittype:”select”,editoptions:{value:<?=$season_list?>}},
And the values in this case should be a string
- i.e. value:'1:spring;2:summer...'
See docs and examples.
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:45
04/11/2008
Tony,
This is under the discussion forum, not the help forum. I am want to discuss how the keys are working with the select and then make some changes to imrove the product.
As to your comment; The php code that generates the list correctly
formats the string. Generated code below:
editoptions:{value:"1:2005-2006;2:2006-2007;3:2007-2008;4:2008-2009;5:2009-2010; 6:2010-2011; 7:2011-2012;8:2012-2013;9:2013-2014"}},
Barry
08:14
Moderators
30/10/2007
Hello,
Sorry for this - it is my bad - I need really to update to
new Forum
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:
76 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