title: How to dynamically show/hide columns in extjs Grid?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1797621/how-to-show-hide-column-in-a-grid-panel">how to show/ hide column in a grid panel</a>  </p>
  </blockquote>
  
  
  
  <p>In extjs gridpanel, there is an attribute called : visibleColumns.
  What I want is this:</p>
  
  <pre><code>someGrid = new Gridpanel({
  store: this.someStore,
  flex: 1,
  if (someCond=true)
  visibleColumns:[
  col1,col2
  ]
  else
  visibleColumns:[
  col3,col4
  ]
  });
  </code></pre>
  
  <p>How to achieve the if (someCond=true) ?</p>