【问题标题】:jqGrid - clicking on row removes altclass and hoverrowsjqGrid - 单击行删除 altclass 和 hoverrows
【发布时间】:2011-04-24 09:47:21
【问题描述】:

我们使用带有altclass 集和hoverrows:true 的jqGrid。当您单击一行时,altclass 类不再应用,并且悬停效果不再对单击的行起作用。如何阻止这种情况发生?

【问题讨论】:

  • 不确定我是否完全明白了这个问题,但是如何同时应用“altclass”和“clicked”类?
  • 哦,所以当您单击一行时,jqGrid 会应用clicked 类?这可以解释这种行为。有什么方法可以让 jqGrid 不应用 clicked 类?

标签: jquery jqgrid hover zebra-striping


【解决方案1】:

您可以向onSelectRow 事件添加自定义代码,以防止在单击时突出显示该行。例如:

onSelectRow: function(id){
    jQuery(myGrid).resetSelection();
} 

【讨论】:

    猜你喜欢
    • 2011-03-17
    • 2011-07-24
    • 2013-07-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-11-03
    • 1970-01-01
    相关资源
    最近更新 更多