Hi!
I am trying to figure why rowId is Null when the radio button is clicked for the first time.
What we have are radio buttons and when one is clicked then it should get its rowId and its value and put it into an input box with a comma separating each row id and its value
eg:13004238~01~01:02, 110012178~01~01:05, 110014742~01~01:03 Here 3004238~01~01 is the row id and : separates the row id and value of the clicked radio button and 02 is the value of the checked radio button.
I get a null value for rowId the first time the radio button is clicked null:04 and after the second click it seems to work. 13004238~01~01:02, 110012178~01~01:05, 110014742~01~01:03
I noticed that before clicking on the radio button if you click on any row, and then click on the radio button, it works.
Can you please advise where I am going wrong ?
[code]
var mygrid; $(function() { $("input:radio").click(function() { var selectedId=mygrid.getSelectedRowId(); var clicked = []; $("input[type=radio]:checked").each(function() { clicked.push(selectedId+":"+this.value); }); $("#ANSWER\\.TTQ\\.MENSYS\\.4\\.").val(clicked); }); }); function doInitGrid(){ mygrid.setHeader("Programme,Route,UCAS ID,Name,FeeSts,Yr of
Entry,Rsp 1,YrS,Brd,Match,Qual,Grd,Subject,Updated,Conditions,Firm Choice
Details,