This question is locked. New answers and comments are not allowed.
.Columns(columns => { columns.Bound(e => e.PrescriptionID).Hidden(); columns.Bound(e => e.RxType).Width(80).Title("Rx Type"); columns.Bound(e => e.Medication); columns.Bound(e => e.SIG); columns.Bound(e => e.StartDate).Format("{0:d}").Width(100).Title("Start"); columns.Bound(e => e.EndDate).Format("{0:d}").Width(100).Title("End"); columns.Template(e => { if (e.EndDate>DateTime.Now ) { @Html.ActionLink("Stop", "StopMedication", "Medication", new { id = e.PrescriptionID }, new { @class = "standard button" }) } else { @Html.ActionLink("Renew", "RenewMedication", "Medication", new { id = e.PrescriptionID }, new { @class = "standard button" }) } }); })