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
Function setSelection with problems for me
05/04/2010
16:20
Avatar
aeNR
New Member
Members
Forum Posts: 2
Member Since:
05/04/2010
sp_UserOfflineSmall Offline

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.

08/04/2010
12:48
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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.

27/04/2010
14:57
Avatar
aeNR
New Member
Members
Forum Posts: 2
Member Since:
05/04/2010
sp_UserOfflineSmall Offline

Thx Tony, ill update my version, i hope it is the problem.

Forum Timezone: Europe/Sofia

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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information