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

[Solved] Unable to define template for boolean column

0 Answers 31 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.
Carl
Top achievements
Rank 1
Carl asked on 26 Jan 2011, 10:40 PM
I tried to modify an example from URL: http://www.telerik.com/community/forums/aspnet-mvc/grid/cell-text-in-cellaction.aspx
for displaying the values of a boolean column as YES or NO

<% Html.Telerik()
  .Grid(Model)
  .Name("MyGrid")
  .Columns
  (
    columns =>
    {                     
      columns.Bound(o => o.InstrumentName)
        .Title("Instrument")
        .Width(105);
      columns.Bound(o => o.IsCompleted)
        .Template
        (
          o =>
          {
            %>
              <%= o.IsCompleted ? "Yes" : "No" %>
            <%
          }
        )
        .Title("Completed")
        .Width(65);
    }
  )
  .Render();
  %>

I receive a compilation error CS1525: Invalid expression term ')'.  I am unable to locate the issue!
Tags
Grid
Asked by
Carl
Top achievements
Rank 1
Share this question
or