Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jqGrid disable row highlighting

How can you programatically disable the grid from highlighting a row when you hover over it with your mouse? Looking to do disable this only at certain times.


This is the code from Oleg which worked:

  $('#result-close').click(function() {  
      //Turn off hover highlighting
      $("#list").unbind('mouseover');
      $("#list").unbind('mouseout');

      //Highlight row                    
      $("#" + selid).effect("highlight", {}, 5000);  

      //Turn on hover highlighting 
      setTimeout(function(){ 
                    $("#list").bind('mouseover',function(e) {
                        ptr = $(e.target).closest("tr.jqgrow");
                        if($(ptr).attr("class") !== "subgrid") {
                            $(ptr).addClass("ui-state-hover");
                        }
                        return false;
                    }).bind('mouseout',function(e) {
                        ptr = $(e.target).closest("tr.jqgrow");
                        $(ptr).removeClass("ui-state-hover");
                        return false;
                    });
      }, 2000);         

      $('#dialog').dialog( "close" );
  });
like image 759
Marcus Leon Avatar asked Sep 28 '10 20:09

Marcus Leon


1 Answers

Use hoverrows:false option.

like image 51
Oleg Avatar answered Nov 07 '22 11:11

Oleg