I am trying to display the link based on if condition in web grid in asp.net mvc. If the record exceeds end date, then the link is displayed else not.
grid.Column("", format: (item =>
{
if (DateTime.Now > item.EndDate)
{
Html.ActionLink(
"File ClAIM",
"Edit",
new { id = item.id },
new { @class = "action-link" });
}
return false;
}))
It is displaying false in all my records.Any help would be appreciated.