Forum
![sp_Feed](http://www.trirand.com/blog/wp-content/sp-resources/forum-themes/default/images/sp_Feed.png)
![sp_TopicIcon](http://www.trirand.com/blog/wp-content/sp-resources/forum-themes/default/images/sp_TopicIcon.png)
02:10
![Avatar](http://www.trirand.com/blog/wp-content/forum-avatars/defaults/userdefault.png)
05/11/2014
![sp_UserOfflineSmall](http://www.trirand.com/blog/wp-content/sp-resources/forum-themes/default/images/sp_UserOfflineSmall.png)
I have been looking all over for a solution to this. I see dozens of people asking how but have yet to find an answer?
using the daturl/json methods how do you dynamically generate the dropdown select box?
so say for example a person can add a record for any given month. the drop down would have 1-12 in it.  then after they add the first month the next row add would have 2-12 in it and so on. my call to the database works find if i hardcode a person id, but I want to make the personid dynamic based on something that happens elsewhere in the page. How do i make this happen?
Â
as i said I see this asked over and over, but have yet to find a workable solution? being new to jqgrid maybe I just dont understand the tool well enough?
12:05
![Avatar](http://www.trirand.com/blog/wp-content/forum-avatars/defaults/moderatordefault.png)
Moderators
30/10/2007
![sp_UserOfflineSmall](http://www.trirand.com/blog/wp-content/sp-resources/forum-themes/default/images/sp_UserOfflineSmall.png)
upperdeck said
do i take the lack of replies to mean its a dumb question or noone knows how to do it? it seems like a basic feature that many have been looking for answer too.
Hello,
If you do not know this is a Open Source project and we do not have agreements to answer quick.
This will be changed soon.
Â
Now to the question - If I understand right you will to cut the selects for one field based on the selection of the previous one.
This can not be done automatically using dataUrl.
I recommend you to obtain first all the selects in all fields and the use JavaScript to decrease the elements on it based on the selection - if I understand right.
For this purpose you can bind a change event of the select. To do this I recommend you to use dataInit on which you can bind the event.
Â
Another possible solution is to call your own ajax after the change of the field and fill the next field with the needed data from the server.
Â
Kind Regards
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.
03:05
![Avatar](http://www.trirand.com/blog/wp-content/forum-avatars/defaults/userdefault.png)
05/11/2014
![sp_UserOfflineSmall](http://www.trirand.com/blog/wp-content/sp-resources/forum-themes/default/images/sp_UserOfflineSmall.png)
I appreciate any help. I was more wondering if i was chasing a rainbow or if i had a realistic goal. i have only been coding for a few days in this tool so didnt want to be bogged down with something i could never get working
I have a grid with players in it. the players have a record for every week they play. the week drop down is created by a separate process. so after week one the drop down has a 1 in it. after week 2 the drop down has 1,2 and so on. the stats dont get updated every week so sometimes i will go in later say week 3 and the dropdown says 1,2,3. So i choose week 1 and add a record. Now I want to add a new row and the drop down should only allow 2,3 to be selected.   this changes for every player.  The grid knows which player is being modified so the drop down would need to pass that to the ajax that builds the select. in the sql call it looks to see if a week already has a record and knows not to send it back.
Â
so in essence the select is not built on something that happens to a field in a row but by what ID was used to build the grid.Â
I think i understand it could be done if the select was built every time a add event fired, just trying to find an example of how to do that..
thanks
15:31
![Avatar](http://www.trirand.com/blog/wp-content/forum-avatars/defaults/moderatordefault.png)
Moderators
30/10/2007
![sp_UserOfflineSmall](http://www.trirand.com/blog/wp-content/sp-resources/forum-themes/default/images/sp_UserOfflineSmall.png)
Hello,
Thanks for sharing.
Â
Kind 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:
27 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