【问题标题】:Kendo UI Column with html content带有 html 内容的 Kendo UI 列
【发布时间】:2019-06-19 18:03:00
【问题描述】:

我想在 kendo UI Col 中显示 HTML, 下面是stackblitz https://stackblitz.com/edit/kendo-ui-grid-78bc3s?file=app/products.ts 我要怎么做才能让记录“Chai”显示为粗体?

谢谢

【问题讨论】:

    标签: angular kendo-ui grid


    【解决方案1】:

    请尝试以下代码 sn-p。

    现有代码:-

        <kendo-grid-column field="ProductName" title="Name" width="250">
        </kendo-grid-column>
    

    新代码:-

        <kendo-grid-column field="ProductName" title="Name" width="120">
            <ng-template kendoGridCellTemplate let-dataItem>
                 <div [innerHTML]="dataItem.ProductName"></div>
            </ng-template>
        </kendo-grid-column>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-12-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多