2017-06-28 9 views
0

私はKendoGrid、javascriptのGridViewを持っています。アイコンの列のJavascriptのクラスをKendoGridのテンプレートとして参照するにはどうすればよいですか?

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> "どのように私はそれを参照するかを参照する必要がありますか?そのクラスのアイコンが表示されるようにテンプレートをどのように入れますか?

答えて

1

私は(それがアイコンが付いたボタンを示して)私のプロジェクトでは、このようにやっている:

{ 
    title: "&#9733;", 
    width: "50px", 
    template: '<a class="btn btn-primary k-grid-custom-btn search-btn details-small-btn"></a>' 
} 
関連する問題