2016-11-18 90 views

回答

0

我想你执行的代码之前创建的网格一些错误。你应该把代码移到正确的地方。见https://jsfiddle.net/3304edu4/,它采用

$($("#grid")[0].grid.hDiv) 
    .find("th.ui-th-column") 
    .off("mouseenter mouseleave"); 

顺便说一句,你可以移动代码onInitGrid回调,这将电网(例如列标题)的外侧部分后调用内部创建:

onInitGrid: function() { 
    $(this.grid.hDiv) 
     .find(".ui-jqgrid-labels th.ui-th-column") 
     .off("mouseenter mouseleave"); 
} 

请参阅https://jsfiddle.net/3304edu4/1/