【问题标题】:default selected row color in kendo grid doesn't effect剑道网格中默认选择的行颜色不起作用
【发布时间】:2023-04-03 11:43:01
【问题描述】:

我根据某些条件设置行背景颜色 Ondatabound 事件

               $('tr[data-uid="' + row.uid + '"] ').css("background-color", "green");

when the row is selected the default row selection color doesn't appear, the above new style is overriding the default behavior.即使我在

上明确设置行颜色
    .k-grid table tr.k-state-selected
    {
     background: #22B99F;
     border-color:#22B99F;
    }

以上没有影响。当用户单击行时,想要将行颜色更改为上面的最佳方法是什么?

【问题讨论】:

    标签: jquery row kendo-grid selectable


    【解决方案1】:

    试试下面的代码

     $('tr[data-uid="' + row.uid + '"] ').addClass("green-row")
    

    并添加新的 css

    .green-row td{
        background: green!important;
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-07-25
      • 1970-01-01
      相关资源
      最近更新 更多