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
Dynamic dataurl for select lists
28/07/2011
14:27
Avatar
Ken
Member
Members
Forum Posts: 5
Member Since:
28/07/2011
sp_UserOfflineSmall Offline

 

Hi all

I have been trying to solve a problem for a couple of days. I am simply trying to add a onchange function to a select tag. Example: <select onchange="javascript:doThisFunction()"> ….

I have tried the following:

  1. Hard coding the onchange into the ajax page which returns the constructed select and options. This then gets removed by jqgrid and so is no good.

  2. Using onSelectRow

…..

,dataEvents: [

{ type: 'change',

fn: function(formid) {

alert('change event');

}

}

]

These events do NOT fire. Everything else will work but not the events when used with the setColProp. I don't know why.

$("#FTPvariations").jqGrid('setColProp','temporary_post_rate'…

 

    1. I have has some success with using the onSelectRow but only when I have an alert before the select boxes are generated. I have tried using a timeout function but still does not work correctly.

Here is what I am trying to achieve:

Select boxes are dynamically populated for each row. When the user selects an option form the select boxes, this fires a function which populates a value of a cell from that option.

The select boxes contains data which is unique to each row.

I have been trying to set a dynamic dataurl in the colmodel but this also does not work unless hard coded

ajax_dataUrl+'1255' (for eample)

This '1255' is an ID which I tried to get from the selrow using the getGridParam method which I need to pass to the ajax creation page.

Like I say, all I need to do is call a function from an onselect event. I have even tried to add this to the select at time of creation from the onSelectRow but no success.

Does anyone have any ideas or examples on how to do this? It's important that I have unique data in the select boxes for each row other than that it sounds pretty simple but it's driving me mad :(

Thanks all and I hope this is clear to anyone reading it.

Regards Ken

 

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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