title: jqGrid adding a class to column by function
body: <p>There's similar question <a href="https://stackoverflow.com/questions/12180718/adding-a-class-to-column">here</a>, but using <code>cellatrr</code> for whole column is quite overloaded. I know there's <code>classes</code> attribute, but it can be only set by static text. I would like to use a function instead like:</p>
  
  <pre><code>$("#jqgrid").jqGrid({ 
  ...
  colModel:
  [
  {
  name:'a',
  index:'a',
  classes: function() {
  return (a &lt; b ? "ui-state-error" : "ui-state-highlight");
  }
  ]
  });
  </code></pre>
  
  <p>Any ideas? Of course without modding jqGrid core :)</p>