How to set style to kendo-grid-column?

时间:2018-07-25 04:56:20

标签: css angular kendo-grid

I'm use of kendo-grid in my project for many reason.

In one of the cell, I want to set input TextBox like:

<kendo-grid-column field="value" title="{{l('Value')}}" width="200"></kendo-grid-column>

As you see, in client, I have bad style Section of bad style

Attention that I never use of any CSS, which want to effect to this.

5 个答案:

答案 0 :(得分:1)

You can use ng-style (I'm using angular 5 and [style] works fo me)

For example:

ng-style="{'background-color':'blue'}"

Learn here:https://docs.angularjs.org/api/ng/directive/ngStyle

<kendo-grid-column field="value"  title="{{l('Value')}}" ng-style="{'background-color':'blue'}" width="200"></kendo-grid-column>

EDIT!

According this answer:Kendo UI Grid and ng-style

Use \" \":

ng-style=\"{'background-color':'blue'}\"

答案 1 :(得分:1)

如果要在kendogrid中设置样式,则必须像这样覆盖您选择标签的基本CSS:

Image processor > a > span > (your general css class)

现在您有了想要的CSS。

答案 2 :(得分:1)

您可以使用属性样式

    <kendo-grid-column [style]="{'background-color': '#666','color': '#fff','line-height': '1em'}">
</kendo-grid-column>

答案 3 :(得分:0)

实际上我不喜欢回答我的问题,但是最好回答。

如果要为其设置样式,则必须找到css类之一并将其覆盖。这是将样式设置为cell-grid

的最佳方法

祝你好运。

答案 4 :(得分:0)

您无法在kendo-grid中设置样式类,但可以找到kendo类并覆盖它们。