I'm an infant with Telerik MVC and for some reason I cant get this grid to display, I keep getting an error
Compiler Error Message: CS1525: Invalid expression term ')'
Source Error:
Line 52: }).Title("Edit News Feed").Width(275);
Line 53: })
Line 54: .DetailView(detailView => detailView.Template(e => {
Line 55: %>
If I remove the detailview contents then everything works okay.
<%
= Html.Telerik()
.Grid(Model.NewsFeeds)
.Name(
"Grid")
.DataKeys(keys => keys.Add(e => e.NewsFeedId).RouteKey(
"Id"))
.ToolBar(commands => commands.Insert().ButtonType(
GridButtonType.ImageAndText).ImageHtmlAttributes(new
{
style =
"margin-left:0"
}))
.DataBinding(dataBinding => dataBinding.Server()
.Insert(
"InsertNewsFeed", "NewsFeed")
.Delete(
"DeleteNewsFeed", "NewsFeed")
.Update(
"UpdateEmployee", "NewsFeed"))
.Columns(columns =>
{
columns.Bound(e => e.MarketId).Width(400).Encoded(
false);
columns.Bound(e => e.Label).Width(275).Encoded(
false);
columns.Bound(e => e.Description).Width(500).Encoded(
false);
columns.Bound(e => e.Name).Width(275).Encoded(
false);
columns.Bound(e => e.HyperLink).Width(275).Encoded(
false);
columns.Bound(e => e.ToolTipDescription).Width(500).Encoded(
false);
columns.Bound(e => e.ToolTipWhy).Width(275).Encoded(
false);
columns.Bound(e => e.ToolTipLink).Width(275).Encoded(
false);
columns.Bound(e => e.ToolTipSource).Width(275).Encoded(
false);
columns.Bound(e => e.IsActive).Width(100).Encoded(
false);
columns.Bound(e => e.OrderBy).Width(100);
columns.Command(commands =>
{
commands.Edit().ButtonType(
GridButtonType.ImageAndText);
commands.Delete().ButtonType(
GridButtonType.ImageAndText);
}).Title(
"Edit News Feed").Width(275);
})
.DetailView(detailView => detailView.Template(e => {
%>
<ul>
<li>Label: e.Label </li>
<li>Description: e.Desciption </li>
<li>Name: e.Name </li>
<li>HyperLink: e.HyperLink </li>
<li>Tool Tip Description: e.ToolTipDescription </li>
<li>Tool Tip Link: e.ToolTipLink </li>
</ul>
<%
}))
.RowAction(row =>
{
// Expand initially the detail view of the first row
if (row.Index == 0)
{
row.DetailRow.Expanded =
true;
}
})
.Pageable()
.Render();
%>