title: How does jqGrid dynamically populate the list of options based on status data?
body: <p>I am currently using jQgrid to draw a list and data is being retrieved through Ajax. I'm getting the list back normally, and there's nothing wrong with it. </p>
  
  <p>My problem is that I have to dynamically populate the <strong>list of options</strong> based on the <strong>status value</strong> I'm getting.</p>
  
  <p><strong>A place to call data:</strong></p>
  
  <pre class="lang-js prettyprint-override"><code>$(function(){
  
      search_provider();
  
  
      // grid resize
      $(window).on('resize.jqGrid', function() {
          $("#requestList").jqGrid('setGridWidth', $(".grid-cover").width());
      })
  
  
  });
  
  function search_provider() {
  
  
      var queryData = $("#searchList").serialize();
  
      $.ajax({
          url : "/v1/point/admin/provider/game_provider_list",
          type : "GET",
          dataType : "json",
          data: queryData,
          success : function(result) {
              $("#resultLength").text(result.jqgrid_data.length);
              if(result.jqgrid_data.length == 0){
                  noData();
              }else{
              $('#grid-cover').show();
              $('#no-data').hide();
              setRequestList(result.jqgrid_data)
              }
          }
      })  
  }
  </code></pre>
  
  <p><strong>a place to be filled dynamically:</strong></p>
  
  <pre class="lang-js prettyprint-override"><code>{
              name : 'approval_status',
              index : 'approval_status',
              align : 'center',
              editable : true,
              edittype : 'select',
              formatter : 'select',
              editoptions : {
                  value : "0:Unauthorized;1:Approval;2:Hold;3:Denial of approval;4:Reclamation",
                  dataEvents : [{
                      type : 'change',
                      fn : function(e) {
                          ...
                      }
                  }]
              }
          }
  </code></pre>
  
  <p>It is now showing all the lists.</p>
  
  <p>When the value of <code>approval_status</code> is '0' return <code>"0:Unauthorized;1:Approval;2:Hold;3:Denial of approval"</code></p>
  
  <p>When the value of <code>approval_status</code> is '1' return <code>"1:Approval;4:Reclamation"</code></p>
  
  <p>When the value of <code>approval_status</code> is '2' return <code>"1:Approval;2:Hold;3:Denial of approval"</code></p>
  
  <p>When the value of <code>approval_status</code> is '3' return <code>"1:Approval;2:Hold;3:Denial of approval"</code></p>
  
  <p>I want to be changed as above. How can you solve this problem?</p>