title: Conditional statement in GridView to show or hide HyperlinkField data
body: <p>My code:</p>
  
  <pre><code>&lt;asp:HyperLinkField Text="Static&lt;br /&gt;Map" HeaderText=""               
             DataNavigateUrlFields="PWSNO,TAG_NO"                 
             Visible = '&lt;%# Eval("Status").ToString() == "Inactive" ? false : true %&gt;'                
              DataNavigateUrlFormatString="index.aspx?No={0}&amp;tag={1}" 
              ItemStyle-HorizontalAlign="Center" Target="_blank" /&gt;
  </code></pre>
  
  <p>What I'm trying to do is if "Status" property returns value of "Inactive" I don't want a link in that column to be created. </p>
  
  <p>But with my existing code I'm getting an error stating </p>
  
  <blockquote>
    <p>Error Databinding expressions are only supported on objects that have a DataBinding event. System.Web.UI.WebControls.HyperLinkField does not have a DataBinding event.</p>
  </blockquote>