This is a migrated thread and some comments may be shown as answers.

[Solved] Help with DetailView

1 Answer 41 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Carlyle
Top achievements
Rank 1
Carlyle asked on 21 Apr 2011, 02:57 PM
All,

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();

 

%>

1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 22 Apr 2011, 06:37 AM
Hello Carlyle,

 You can check the Troubleshooting section of our online help.

Regards,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
Carlyle
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or