Forum


14:27

28/07/2011

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:
-
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.
-
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'…
-
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
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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66