1
votes

I am getting an "Uncaught error: Invalid template" on a Kendo grid. Problem is that I am NOT specifying a template.

Here is my markup for the GRID:

        @(Html.Kendo().Grid(Model.Results)
        .Name("grid")
        .Sortable()
        .Groupable()
        .Pageable()
        .Pageable(pageable => pageable
            .Refresh(true)
            .PageSizes(true)
            .ButtonCount(5)
        )
    )

An here is the error I am getting:

Uncaught Error: Invalid 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#' Generated code:'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;'

1

1 Answers

1
votes

Maddening... Moved on to a Kendo chart, dynamic series, with the same data and started getting random errors (Uncaught SyntaxError: Unexpected token ). Saw that a common theme between these two random errors was the use of column names that have TITLES/NAMES that began with a numeric value (2013PopEst). Changed it around so that it didn't begin with a numeric value (PopEst2013) and WHAM!!! Everything working, no more funky errors.

Just in case someone else has this issue.