Compiler Error Message: CS1525: Invalid expression term ')'
|
Here is my code:
<%= Html.Telerik().Grid(Model.ProductTemplateList)
.Name("Grid").HtmlAttributes(new { style = "width:90%;" })
.DataKeys(keys => keys.Add(c => c.ProductId))
.DataBinding(dataBinding => dataBinding.Server()
.Select("Edit", "ProductTemplate"))
.Columns(columns =>
{
columns.Command(commands => { commands.Edit(); } ).Width("12%");
columns.Template(o =>
{
%>
<%= Html.ActionLink("Edit", "Home", new { id = o.ProductId }) %>
<%
}).Title("Edit");
columns.Bound(o => o.ProductId).Width("7%").Title("ID");
columns.Bound(o => o.ProductName).Width("15%").Title("Name");
columns.Bound(o => o.Product_Description).Width("35").Title("Description");
columns.Bound(o => o.ProductCategory.ProductCategoryName).Width("10%").Title("Category");
columns.Bound(o => o.ControlPlanId).Width("8%").Title("Plan ID");
columns.Bound(o => o.Status).Width("8%").Title("Status");
columns.Bound(o => o.DateTimeAdded).Width("15%").Title("Created Date").Format("{0:MM/dd/yyyy}");
})
.Filterable()
.Pageable()
.Scrollable()
.Sortable();
%>
I have set up the web.config and site.master correctly and I have no problem displaying the grid and Model data when I exclude the template column. It's only when I add the template column, I get the error. Can someone help me see what I may be missing?