title: is there an api in jqgrid to add advanced filters to post data?
body: <p>i see how in this code, you can preset postdata filters by have this in your javascript.</p>
  
  <pre><code>postData: {
     filters:'{"groupOp":"AND","rules":['+
      '{"field":"invdate","op":"gt","data":"2007-09-06"},'+
      '{"field":"invdate","op":"lt","data":"2007-10-04"},'+
      '{"field":"name","op":"bw","data":"test"}]}'
  }
  </code></pre>
  
  <p>is there any API that allows you to build this up.  Something like:</p>
  
  <pre><code>jqgrid("#grid").addPostDataFilters("AND");
  jqgrid("#grid").addFilteritem("field", "cn", "value");
  jqgrid("#grid").addFilteritem("field1", "eq", "value2");
  </code></pre>
  
  <p>to help generate to top postdata filter code ??</p>
  
  <p>i tried this but it doesn't seem to work:</p>
  
  <pre><code>.jqGrid("setGridParam", { editurl: "/Project/UpdateMe",
           ondblClickRow: function (rowid) {
               editProject(rowid); // window.location.href="/Project/Detail/"+rowid;
           }
  });
  
  var grid = $("#grid");
  var f = { groupOp: "AND", rules: [] };
  f.rules.push({ field: "Name", op: "cn", data: "volat" });
  grid.p.search = f.rules.length &gt; 0;
  $.extend(grid.p.postData, { filters: JSON.stringify(f) });
  </code></pre>
  
  <h2>Update:</h2>
  
  <p>I have this working now (thanks to Oleg) but ifor some reason the Find button somethng comes up with blank (even thought i do have an advanced filter set) i have added a picture</p>
  
  <p><img src="https://i.stack.imgur.com/9yZ3s.png" alt="enter image description here"></p>