Forum


16:20

05/04/2010

Hi everyone.
In my grid i have a col formated by me that shows an input type radio, what i want is when a check the radio, the row get selected.
this is my code:
in the grid colModel:
{name:'opcion', width:35, align:'center', formatter: myFunction},
after the grid declaration:
function myFunction(cellvalue, options, rowObject)
{
seleccionar = '<input type="radio" id="'+options.rowId+'" name="seleccion" onclick=" javascript: enviar('+ options.rowId +')">';
return seleccionar
}
function enviar(param)
{
$('#grid_bonificacion').setSelection(param);
... some
code
here ...
}
the problem is it works only the first time i call it, and not properly at all because inspecting with firebug it shows something like this: $t.p.selrow.replace is not a function
of course if i call it again the row does't get selected.
would appreciate any help.
thx.
12:48

Moderators
30/10/2007

Hello,
1. SetSelection is a toggle function - if you call it first time the row will be selected. If you call it second time on the same row the row will be deselected.
2.Since I see that you tell me "$t.p.selrow.replace is not a function" it seems like you use some older version of jqGrid where this problem is fixed in the last release.
Best Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
Most Users Ever Online: 715
Currently Online:
77 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