2017-08-28 55 views
-1
  • 我是新来的剑道ui。
  • 我想结合字段playerId和playerName的值
  • 我需要结合两个模板值。
  • 你可以告诉我怎么做.. - 提供我的代码如下。
  • 我试图通过执行这样但不工作

“that.jumping.ImageType(模型);” + “#= playerName.substring(playerName.lastIndexOf( '/')+ 1)#”在使用剑道ui时将js中的网格值组合在一起

{ 
      field: "playerId", 
      width: 25, 
      title: " ", 
      sortable: false, 

      template: function name(model) { 
       return that.jumping.ImageType(model); 
      }, 
      editor: function(container, model) { 
      } 
      }, { 
      field: "playerName", 
      filterable: that.gridkendo.getAutoFilterName("eq", "playerName"), 
      headerAttributes: { 
       class: "multiCheckboxFilterEnabled" 
      }, 
      title: "File Name", 
      width: 200, 
      editable: false, 


      template: "<a onclick=\"window.open('#= playerName#', 'popup', 'width=800,height=600,scrollbars=yes,resizable=no')\">#= playerName.substring(playerName.lastIndexOf('/')+1) #</a>" 



      } 

回答

0

不知道你的这两个字段的值,但你可以这样做:

{ 
    field: "test", 
    template: "#=playerId##=playerName#" 
} 

它将DISPLY:

1PlayerName // 1 : playerId and PlayerName: playerName 
+1

感谢您的回复......但#symbol –

+0

渲染数据kendo使用'#=一些文本#'格式的用法是什么?我刚刚使用过两次打印这两个值 –

+1

嘿,它没有工作 –