views:

581

answers:

1

Is this possible without hacking into the innards of the jqGrid JS?

setSelection( "rowX", false ) doesn't work, and resetSelection() deselects all rows.

+2  A: 

According to the documentation, setSelection

Toggles a selection of the row with id = rowid; if onselectrow is true (the default) then the event onSelectRow is launched, otherwise it is not.

On the demo page, setSelection is called like

jQuery("#list9").jqGrid('setSelection',"13");

Does this work? Could you supply us with the constructor otherwise?

henchman
This works. I didn't realize that the second argument to setSelection only determines if onSelectRow is called. This will satisfy my needs, but ideally there would be a method for setting a row selection regardless of it's current state.
MikeWyatt