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

[Solved] Column Template Action Links with if

1 Answer 55 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.
Darko
Top achievements
Rank 1
Darko asked on 03 Jan 2012, 12:21 AM
Hi guys, here is my column Template code:

columns.Template(m => @<text> @Html.ActionLink("Details", "Details", new { id = m.Id })
           @if (!m.Started)
           {
               @Html.ActionLink("Edit", "Edit", new { id = m.Id })
               @Html.ActionLink("Delete", "Delete", new { id = m.Id })
           } </text>).Title("Action").Width(180);

The first ActionLink is always visible, the last depending on the if condition. I can't get it to work.
Anyone idea? What am I missing?

Best regards,
Darko

1 Answer, 1 is accepted

Sort by
0
Darko
Top achievements
Rank 1
answered on 03 Jan 2012, 12:41 AM
Tags
Grid
Asked by
Darko
Top achievements
Rank 1
Answers by
Darko
Top achievements
Rank 1
Share this question
or