title: jqGrid colModel dynamic Searchoptions
body: <p>Is it possible to have a dynamic (not hard coded) search filter values for the jqGrid column?</p>
  <p>So in the example such as:</p>
  <pre><code> $('#my-grid').jqGrid({
              datatype: 'json',
              loadonce: true,
              jsonReader: common.jqgrid.jsonReader('Workorder'),
              mtype: 'POST',
              colNames: ['Project', 'PO Number', 'Type', 'Folder'],
              colModel: [
                  { name: 'Project', index: 'Project', width: 80, sortable: false, search:false},
                  { name: 'PONumber', index: 'PONumber', width: 60, sortable: false, search: true },
                  { name: 'Type', index: 'Type', width: 60, sortable: false, search: true},
                  { name: 'Folder', index: 'Folder', width: 60, sortable: false, search: false },
                             ],
              scroll: true,
                     });
  </code></pre>
  <p>I would like the type to have a drop down filter with values that are array of distinct values from the data subset coming back.</p>
  <p>How would I achieve this?</p>
  <h2>Edit</h2>
  <p>Is the jqGrid data accessible directly? I am looking for something like
  <code>Data.Cols[2].Distinct</code> that will give me the distinct array of values from column 3(in this case). Is this possible?</p>
  <h2>Edit 2</h2>
  <p>This is the code:</p>
  <pre><code>onLoadComplete: function (data) {
          var $this = $('#gridReport');
  
          if ($this.jqGrid(&quot;getGridParam&quot;, &quot;datatype&quot;) === &quot;json&quot;) {
             
              // first loading from the server
              // one can construct now DISTINCT for 'Type' column and
              // set searchoptions.value
              $this.jqGrid(&quot;setColProp&quot;, &quot;Type&quot;, {
                  stype: &quot;select&quot;,
                  searchoptions: {
                      value: buildSearchSelect(getUniqueNames(&quot;Type&quot;)),
                      sopt: [&quot;eq&quot;, &quot;ne&quot;]
  
                  }
              });            
          }
      },
  </code></pre>