Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
160
rated 0 times [  166] [ 6]  / answers: 1 / hits: 34432  / 15 Years ago, wed, january 27, 2010, 12:00:00

I've looked at the documentation but I've been unable to find an answer. Is there a way to prevent a row from being highlighted when selected? That or even a way to stop the row being selected at all. I like the hoverrows: true option, but ideally I would like to stop a row from being selected on-click.



Thanks,



Update:
I've been able to hackily implement something which seems to be an interim fix. I don't really like it at all and would idealy like a better solution, if there is one...



I have found that if I pass the option



onSelectRow: function(rowid, status) {
$('#'+rowid).removeClass('ui-state-highlight');
}


when I instantiate the jqGrid, I can strip the highlight when it is added.



Is there another, more ideal, way to do this?


More From » jquery

 Answers
34

Use the following code:



beforeSelectRow: function(rowid, e) {
return false;
}

[#97736] Sunday, January 24, 2010, 15 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
makiyac

Total Points: 470
Total Questions: 100
Total Answers: 115

Location: Botswana
Member since Sat, Jan 7, 2023
1 Year ago
;