thalla thalla - 1 year ago 206
jQuery Question

JQgrid : disable table header mouse hover style

How to disable jqgrid table header hover style.
I tried answer from this solution from another stackover flow question,

$($("#gridId")[0].grid.hDiv).find(".ui-jqgrid-labels th.ui-th-column")

it disable the header hover style but shows some error in console

Uncaught TypeError: Cannot read property 'grid' of undefined(…)

Answer Source

I suppose that you executed the code before the grid is created. You should just move the code to the correct place. See, which uses

    .off("mouseenter mouseleave");

By the way you can move the code inside of onInitGrid callback, which will be called after the outer part of the grid (for example column headers) are created:

onInitGrid: function () {
        .find(".ui-jqgrid-labels th.ui-th-column")
        .off("mouseenter mouseleave");


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download