title: how to use if condition in webgrid using asp.net mvc
body: <p>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.</p>
  
  <pre><code>grid.Column("", format: (item =&gt;
      {
          if (DateTime.Now &gt; item.EndDate)
          {
              Html.ActionLink(
                  "File ClAIM",
                  "Edit",
                  new { id = item.id },
                  new { @class = "action-link" });
          }
          return false;
      }))
  </code></pre>
  
  <p>It is displaying false in all my records.Any help would be appreciated.</p>