我有一个带有超链接列的kendoGrid。所需的行为是当我单击该列项时,它会打开一个新的浏览器选项卡并打开该文档。 我得到了以下工作:
columns: [
{
selectable: true,
width: "10px",
headerTemplate: ' '
},
{
title: "ID",
field: "ProposalId",
template: kendo.template("<a href='http://testapp.com/RateSheet?Id=${ProposalId}' onclick='window.open(this.href);return false;'>#= ProposalId # </a>")
}
但是当我尝试插入动态网址时,出现错误: SCRIPT1006:预期&#39;)&#39;
这是我必须动态插入网址:
template: kendo.template("<a href='" + @Model.SHEET_URL + "${ProposalId}' onclick='window.open(this.href);return false;'>#= PriceDealProposalId # </a>")
模型中SHEET_URL的值为:
this.SHEET_URL = "http://testapp.com/RateSheet?ProposalId=";