我有一个 KendoGrid,一个 javascript GridView。
columns: function () {
return [
{
title: "Icon",
width: 32,
template: function (data)
{
}
},
{
field: "DisplayFileName",
title: "Document Name",
width: 300,
//template: function (data) {
//}
},
{
field: "DocumentType",
title: "DocumentType",
titleKey: 'Document Type',
filterable: true,
},
对于图标列,我需要引用'<i class="fa fa-warning red"></i>
' 我该如何引用它?如何放入模板以便显示该类的图标?
最佳答案
我在我的项目中一直这样做(它显示带有图标的按钮):
{
title: "★",
width: "50px",
template: '<a class="btn btn-primary k-grid-custom-btn search-btn details-small-btn"></a>'
}
关于javascript - 如何引用 Javascript 中的类作为 KendoGrid 中的模板?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44812637/