我在Kendo网格上得到一个“未捕获的错误:无效的模板”。问题是我没有指定模板。
下面是我的网格标记:
@(Html.Kendo().Grid(Model.Results)
.Name("grid")
.Sortable()
.Groupable()
.Pageable()
.Pageable(pageable => pageable
.Refresh(true)
.PageSizes(true)
.ButtonCount(5)
)
)
下面是我得到的错误:
未捕获的错误:无效的template:'#:data.StateCode==null?'':data.StateCode##:data.StateName==null?'':data.StateName##:data.CountyName==null?'':data.CountyName##:data.2010Population==null?'':data.2010Population##:data.2010PopulationEstimate==null?'':data.2010PopulationEstimate##:data.2011PopulationEstimate==null?'':data.2011PopulationEstimate##:data.2012PopulationEstimate==null?'':data.2012PopulationEstimate##:data.2013PopulationEstimate==null?'':data.2013PopulationEstimate#‘生成的代码:’var o,e=kendo.htmlEncode;with(data){o=''+e(data.StateCode==null?'':data.StateCode)+''+e(data.StateName==null?'':data.StateName)+''+e(data.CountyName==null?'':data.CountyName)+''+e(data.2010Population==null?'':data.2010Population)+''+e(data.2010PopulationEstimate==null?'':data.2010PopulationEstimate)+''+e(data.2011PopulationEstimate==null?'':data.2011PopulationEstimate)+''+e(data.2012PopulationEstimate==null?'':data.2012PopulationEstimate)+'‘+e(data.2013PopulationEstimate==null?'':data.2013PopulationEstimate)+'';}return o;‘
发布于 2014-09-29 20:53:58
令人抓狂..。移动到剑道图表,动态序列,使用相同的数据,并开始获得随机错误(未捕获SyntaxError:意外令牌)。我看到这两个随机错误之间的一个共同主题是使用标题/名称以数值(2013PopEst)开头的列名。更改了它,使其不以数字值(PopEst2013)和WHAM开头!一切正常,没有更多的时髦错误。
以防其他人也有这个问题。
https://stackoverflow.com/questions/26107726
复制相似问题