title: Hide grid columns dynamically
body: <p>I'm trying to hide columns in a grid tab dynamically, it works fine until the user goes into the column configurations and decides to show the columns.</p>
  
  <p>Once the user does that, my code doesn't affect the columns visibility anymore.</p>
  
  <p>As a POC I tried doing this :</p>
  
  <pre><code>   public PXAction&lt;POOrder&gt; HIDEFIELDS;
      [PXUIField(DisplayName = "hide fields")]
      [PXButton(CommitChanges = true)]
      public virtual void hIDEFIELDS()
      {
          PXUIFieldAttribute.SetVisible&lt;POLineExt.usrFinalDestination&gt;(Base.Transactions.Cache, null, false);
          PXUIFieldAttribute.SetVisible&lt;POLineExt.usrDateExportation&gt;(Base.Transactions.Cache, null, false);
          PXUIFieldAttribute.SetVisible&lt;POLineExt.usrContainerNbr&gt;(Base.Transactions.Cache, null, false);
      }
  
  public PXAction&lt;POOrder&gt; Showfields;
  [PXUIField(DisplayName = "showfields")]
  [PXButton(CommitChanges = true)]
  public virtual void showfields()
  {
      PXUIFieldAttribute.SetVisible&lt;POLineExt.usrFinalDestination&gt;(Base.Transactions.Cache, null, true);
      PXUIFieldAttribute.SetVisible&lt;POLineExt.usrDateExportation&gt;(Base.Transactions.Cache, null, true);
      PXUIFieldAttribute.SetVisible&lt;POLineExt.usrContainerNbr&gt;(Base.Transactions.Cache, null, true);
  }
  </code></pre>
  
  <p><a href="http://recordit.co/5lYGmjOjHl" rel="nofollow noreferrer">http://recordit.co/5lYGmjOjHl</a></p>
  
  <p>How do I prevent this behaviour ?
  what is the difference between PXUIFieldAttribute.SetVisible and PXUIFieldAttribute.SetVisibility ?</p>