gpt4 book ai didi

angularjs - KendoGrid 使用选中的复选框而不突出显示行

转载 作者:行者123 更新时间:2023-12-02 04:29:56 26 4
gpt4 key购买 nike

我正在使用 KendoUi Grid(最新版本)和 AngularJS

我想在一列上使用可选功能,该功能显示一个复选框以(多)选择该行。这很好用。But when the row is selected its colour changes.但我只想使用复选框而不突出显示整行。

我试图弄清楚我必须使用哪个 CSS。这在设置“.k-grid table tr.k-state-selected”css 时也有效。但是,当鼠标悬停在所选行上时,它仍然是彩色的。我也尝试设置这些“.k-grid td.k-state-selected:hover, .k-grid tr:hover”css,但它不起作用。

我必须设置哪个 css,以禁用对选定行的完整突出显示。这是我目前使用的 CSS。悬停部分不起作用。

.k-grid table tr.k-state-selected {
color: red !important;
background-color: none !important;
background: none !important;
border-color: none !important;
}

.k-grid td.k-state-selected:hover, .k-grid tr:hover {
color: green !important;
background-color: none !important;
background: none !important;
border-color: none !important;
}

红色和绿色只是为了测试,看看它是否工作......

那么,我必须(重新)设置哪个 css 才能禁用突出显示?

谢谢

最佳答案

您可以向网格的更改事件添加一个函数。只需将其添加到您的网格定义中即可。

change: functionName

在你的函数调用中:

$('.k-state-selected').removeClass('k-state-selected k-state-selecting'); 

关于angularjs - KendoGrid 使用选中的复选框而不突出显示行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49877201/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com