Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
This topic is locked No permission to create posts
sp_Feed Topic RSS sp_TopicIcon
Dynamically Populate Select Dropdown
15/01/2011
23:43
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

Hello,

You can see that <select> element has id="dependence". So you can use

var sel = $("select#dependence");

or just

var sel = $("#dependence");

to get the <select> element. The element with id="tr_dependence" is <tr> and not <select> element. So from the element the "way" to <select> will be longer:

var sel = $("tr#tr_dependence > td.DataTD > select.FormElement")

Another problem which you can has: you have chosen the wrong place to make modification of the select element. Verify that sel.length === 1.

Best regards
Oleg 

08/07/2011
13:22
Avatar
cvneo
Member
Members
Forum Posts: 47
Member Since:
25/02/2009
sp_UserOfflineSmall Offline

Hello,

I have not found an example to use the events, DATAIN, DataEvent on http://trirand.com/blog/jqgrid.....qgrid.html

It's a shame because I think a lot of people are losing hope to make things further with this plugin, especially since French is look for good keywords to find what I want to do is not easy.

The I simply trying to recover the value of a field of a line to update a drop down list linked together:

Country and state

When editing a line I want to spent the id of the country to see the list of states in the country concerned in the other list:

...                                           

{name:'IDsysPays',index:'IDsysPays', editable:true,edittype:"select",editoptions: { dataUrl: "../jqGrid_options?option=LstOptionPays",
                                                                                                                            dataEvents: [
                                                                                                                              {  type: 'change',
                                                                                                                                fn: function(e) {
                                                                                                                                   $.get("../jqGrid_options",
                                                                                                                                              {option:"LstOptionCantons",IDsysPays:this.value},
                                                                                                                                            function(data){
                                                                                                                                                $('#IDisoState').replaceWith(data);
                                                                                                                                            }    
                                                                                                                                        );
                                                                                                                                }
                                                                                                                              }
                                                                                                                            ] }},

{name:'IDisoState',index:'IDisoState', editable:true,edittype:"select",editoptions: { dataUrl: "../jqGrid_options?option=LstOptionCantons&IDsysPays="+$('#IDsysPays').value()}},
...

Thank you for your help always very valuable.

29/01/2012
03:12
Avatar
illiquent
Member
Members
Forum Posts: 5
Member Since:
29/01/2012
sp_UserOfflineSmall Offline

thanks tony.

that worked great

This topic is locked No permission to create posts
Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
33 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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information