在“onRowClick”上更改增强网格线的样式事件

发布于 2024-10-08 14:18:52 字数 109 浏览 0 评论 0原文

我想更改网格线的颜色但不选择它。这意味着我无法使用 onStyleRow 事件,因为它仅对“selected”、“odd”或“over”事件做出反应。

有什么想法吗?

谢谢

I want to change a color of grid line but without selecting it. It means I cannot use onStyleRow event as it reacts only for 'selected', 'odd' or 'over' event.

Any ideas?

thx

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

柒夜笙歌凉 2024-10-15 14:18:52

我找到了 updateRowStyles(idxRow) 函数,但不知道如何使用它(如何传递 syles 等),并且不确定它是否能解决我的问题

I found an updateRowStyles(idxRow) function, but no idea how to use it (how to pass syles etc.) and not sure if it will solve my problem

泡沫很甜 2024-10-15 14:18:52

您无法通过这种方式更改样式:

var layout = [
{ field: 'denumire', name: 'Denumire', width: '200px', height: '25px', styles: "color:red;" },
{ field: 'valoare', name: 'Valoare', width: '252px', styles: "color:red;"}];

或在布局网格中使用格式化程序

var layout = [
{ field: 'denumire', name: 'Denumire', width: '200px', height: '25px',  formatter:  function (value, rowIndex) {
       return "<div style='height:110px;text-overflow:ellipsis;color:red;'>"+value+"</div>"
} },
{ field: 'valoare', name: 'Valoare', width: '252px',
formatter: function (value, rowIndex) {
       return "<div style='height:110px;text-overflow:ellipsis;color:red;'>"+value+"</div>"
}}];

You cant change your style this way:

var layout = [
{ field: 'denumire', name: 'Denumire', width: '200px', height: '25px', styles: "color:red;" },
{ field: 'valoare', name: 'Valoare', width: '252px', styles: "color:red;"}];

or use formatter in layout grid

var layout = [
{ field: 'denumire', name: 'Denumire', width: '200px', height: '25px',  formatter:  function (value, rowIndex) {
       return "<div style='height:110px;text-overflow:ellipsis;color:red;'>"+value+"</div>"
} },
{ field: 'valoare', name: 'Valoare', width: '252px',
formatter: function (value, rowIndex) {
       return "<div style='height:110px;text-overflow:ellipsis;color:red;'>"+value+"</div>"
}}];
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文