title: If condition or for loop in a webgrid
body: <p>I am using this webgrid in my view.</p>
  
  <pre><code> &lt;div class="grid"&gt;
   @{
  var grid = new WebGrid(Model.SearchResults, canPage: true, rowsPerPage: 15);
  grid.Pager(WebGridPagerModes.NextPrevious);
   @grid.GetHtml(
             htmlAttributes: new { @style = "width:100%", cellspacing = "0" },
             columns: grid.Columns(
             grid.Column(header: "Customer Name", format: (item) =&gt; Html.ActionLink((string)item.FullName, "ShowContracts", new { id = item.UserId }, new { @style = "color: 'black'", @onmouseover = "this.style.color='green'", @onmouseout = "this.style.color='black'" })),
             grid.Column(header: "SSN", format: item =&gt; item.SSN)
  ))
  }
  &lt;/div&gt;
  </code></pre>
  
  <p>I search with SSN and display the results in a webgrid. The displayed data is dummy data. 
  I have a bool AccountVerified in my viewmodel, now I should not give action link to the accounts which are not verified and display text next to them saying account verification pending. Can someone help me on this?</p>