title: jqGrid hide column on view depends another column value
body: <p>I want to show column <code>session</code> based on the corresponding row's cell value of <code>type</code>. Already <code>session</code> column is hidden.</p>
  
  <p>To hide <code>session</code> column i used this below piece of code,</p>
  
  <pre><code>{ name: 'session', index: 'session', hidden:true, editrules:{edithidden:true} },
  </code></pre>
  
  <p>So, I just want to show this column value only in <code>view</code>. If <code>type</code> cell value is equal to <code>Full</code>, I want to hide <code>session</code> in <code>view</code>. Otherwise, I want to show that <code>session</code> column value in <code>view</code>.</p>
  
  <p>I tried using this below code,</p>
  
  <pre><code>onSelectRow: function (id) {
      var celValue = $('#statGrid').jqGrid('getCell', id, 'type');
      if (celValue === 'Full') $('#statGrid').jqGrid('getColProp', 'session').editrules.edithidden = false;
      if (celValue === 'Half') $('#statGrid').jqGrid('getColProp', 'session').editrules.edithidden = true;
  }
  </code></pre>
  
  <p>Once, first <code>if</code> condition get success <code>edithidden</code> property changed to <code>false</code>. So, It hides <code>session</code> in View form. But I could not change that property to <code>true</code> when my second <code>if</code> condition get success.</p>
  
  <p>Why this happened? Is this right way to do this task? or Is there any better way to do this?</p>