kendo grid上的模版示例
{ field: "SCORE", title: "分数", attributes: { style: "text-align:center" }, headerAttributes: { style: "text-align:center" }, template: GetScoreTemplateText },
下面是模版的内容:
function GetScoreTemplateText(item) { var result = "<table>"; if (item) { for (var i = 0; i < item.WorksInfo.length; i++) { result += "<tr>"; result += "<td>" +item.NAME+ "</td>"; result += "<td>" + item.SCORE+"</td>"; result += "</tr>"; result += "<tr>"; } } result += "</table>"; return result; }