Hi:
I am trying the following approach:
And I am getting the following js error:
Microsoft JScript runtime error: Invalid template:
I would like to use as much js as possible and not depend on helper extension methods.
Phil
The error message is:
Microsoft JScript runtime error: Invalid template:'<tr data-uid="#=uid#"><td>#=#</td><td>#=Id#</td><td>#=Last#</td><td>#=First#</td><td>#=Title#</td><td>#=City#</td><td>#=Region#</td><td>#=#</td></tr>' Generated code:'var o,e=kendo.htmlEncode;with(data){o='<tr data-uid="'+(uid)+'"><td>'+()+'</td><td>'+(Id)+'</td><td>'+(Last)+'</td><td>'+(First)+'</td><td>'+(Title)+'</td><td>'+(City)+'</td><td>'+(Region)+'</td><td>'+()+'</td></tr>';}return o;'
I am trying the following approach:
@model IEnumerable<Mvc3App.Models.Employee>@{ ViewBag.Title = "Index";}<script type="text/javascript"> $(document).ready(function () { alert('stopped'); $("#kjsimpleGrid").kendoGrid({ groupable: true, scrollable: true, sortable: true, pageable: true }); });</script><p> @Html.ActionLink("Add", "Create")</p><table id="kjsimpleGrid"> <thead> <tr> <th></th> <th>Id</th> <th>Last</th> <th>First</th> <th>Title</th> <th>City</th> <th>Region</th> <th></th> </tr> </thead> <tbody>@foreach (var item in Model) { <tr> <td> @Html.ActionLink("Edit", "Edit", new { id=item.EmployeeID }) | @Html.ActionLink("Details", "Details", new { id=item.EmployeeID }) </td> <td>@Html.DisplayFor(modelItem => item.EmployeeID)</td> <td>@Html.DisplayFor(modelItem => item.LastName)</td> <td>@Html.DisplayFor(modelItem => item.FirstName)</td> <td>@Html.DisplayFor(modelItem => item.Title)</td> <td>@Html.DisplayFor(modelItem => item.City)</td> <td>@Html.DisplayFor(modelItem => item.Region)</td> <td>@Html.ActionLink("Delete", "Delete", new { id=item.EmployeeID })</td> </tr>} </tbody></table>And I am getting the following js error:
Microsoft JScript runtime error: Invalid template:
I would like to use as much js as possible and not depend on helper extension methods.
Phil
The error message is:
Microsoft JScript runtime error: Invalid template:'<tr data-uid="#=uid#"><td>#=#</td><td>#=Id#</td><td>#=Last#</td><td>#=First#</td><td>#=Title#</td><td>#=City#</td><td>#=Region#</td><td>#=#</td></tr>' Generated code:'var o,e=kendo.htmlEncode;with(data){o='<tr data-uid="'+(uid)+'"><td>'+()+'</td><td>'+(Id)+'</td><td>'+(Last)+'</td><td>'+(First)+'</td><td>'+(Title)+'</td><td>'+(City)+'</td><td>'+(Region)+'</td><td>'+()+'</td></tr>';}return o;'