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

[Solved] Column Temple problem

2 Answers 29 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.
James
Top achievements
Rank 1
James asked on 26 Oct 2010, 02:54 PM
I've downloaded the trial version of the MVC controls and I was attempting to create a simple column template.
Here is my code below and Error below: 

 

Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS1525: Invalid expression term ')'

Source Error:

Line 15:             columns.Bound(o => o.ADNumber).Width(100);
Line 16:             columns.Template(o =>
Line 17: {Line 18:                 
Line 19:                 %>


<%= Html.Telerik().Grid(Model)
        .Name("Grid")
        .PrefixUrlParameters(false)
        .Columns(columns =>
        {
            columns.Bound(o => o.ADNumber).Width(100);
            columns.Template(o =>
            {
               
                %>
                <textarea cols="100" rows="10">
                    <%= o.ADText%>
                </textarea>
                <%
            });
            columns.Bound(o => o.ADText).Width(400);
            columns.Bound(o => o.DocketNumber).Width(100);
            columns.Bound(o => o.EffectiveDate).Format("{0:MM/dd/yyyy}").Width(120);
        })
        .Pageable()
        .Sortable()
        .Scrollable()
        .Render();
%>

 

2 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 26 Oct 2010, 03:25 PM
Hello James,

 Remove the "=" after the start <%:

Before:
<%= Html.Telerik().Grid(Model)
After:
<% Html.Telerik().Grid(Model)

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
0
James
Top achievements
Rank 1
answered on 26 Oct 2010, 03:31 PM
Thank you, that was driving me nuts!

Jim
Tags
Grid
Asked by
James
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
James
Top achievements
Rank 1
Share this question
or