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
sp_Feed Topic RSS sp_TopicIcon
how do I modify the dataUrl when a row is selected?
30/06/2010
22:10
Avatar
ram2010
Member
Members
Forum Posts: 43
Member Since:
13/01/2010
sp_UserOfflineSmall Offline

I have a column which is a select and when the row is selected it fires the dataUrl to retrieve the list from the server.

However I want to be able to modify that url and append the rowId to the end of it. what is the best way to do this?

should I use the dateinit function or is this a dateEvent? If you have a quick example of this I am greatful.

thanks

01/07/2010
14:14
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

You can use dateEvent to do this. See code example here:

/blog/?page_id=393/help/dynamically-populate-select-dropdown/&value=dataEvents&type=1&include=1&search=1&ret=all

Best regards
Oleg 

01/07/2010
23:58
Avatar
ram2010
Member
Members
Forum Posts: 43
Member Since:
13/01/2010
sp_UserOfflineSmall Offline

Hi Oleg

I tried using your dataEvent but i only have it half working. As you know, when a row is selcted, all the columns with a select execute the dataUrl automatically.

problem 1:

What is the dataEvent to use?... 'click' doesnt fire.. 'select' is wrong... any ideas?

problem 2:

How do I identify the rowId when calling dataEvent? I tried putting this

var id = jQuery(#userGrid).jqGrid('getGridParam','selrow');

like so:

                dataEvents :[{type: 'click',
                                fn: function(e) {
                                    var id = jQuery(#userGrid).jqGrid('getGridParam','selrow');
                                    $.get('admin/retrieveUsersAssignedProjectsURL?userId='+id, function(data){
                                    var res = $(data).html();
                                });
                            }
                            }]        

but it causes an error and my grid doesnt load up.

Any thoughts on these 2 issues?

thanks

02/07/2010
12:13
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

Please look at http://www.trirand.com/blog/?p.....-dropdown/ more carfully. You will find for example that type: 'change'.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
68 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