title: JqGrid - Adding Select DropDown to edit form and filling from Database
body: <p>I am a newbie so go easy! But I am trying to fill a <code>select</code> dropdown from a MySQL database on an edit form for a jQGrid.</p>
  
  <p>Here is my code so far:</p>
  
  <pre><code>colNames:['ID','CampaignName','Status'],
  colModel:[
      {
          name:'ID', 
          index:'ID', 
          width:55,
          editable:true,
          editoptions:{
              readonly:true,
              size:10
          }
      }, 
      {
          name:'CampaignName',
          index:'CampaignName',
          width:120,
          align:'left',
          editable:true,
          editoptions:{
              size:25
          }
      }, 
      {
          name:'Status',
          index:'Status',
          width:80,
          align:'left',
          editable: true,
          edittype:'select'
      }
  ],
  </code></pre>
  
  <p>But I need the <code>status</code> field to be a <code>select</code> filled from the database. I have a PHP file called 'StatusDropDown.php' which I have used before to fill a Select Box (see below). How can I get this to work on the edit form on my grid?</p>
  
  <pre><code>&lt;select id="StatusID" name="StatusID" onchange="StatusChanged(this.id)"&gt;
      &lt;?php
          include("StatusDropDown.php");
      ?&gt;
      &lt;OPTION VALUE=0&gt; 
          &lt;?php echo $List ?&gt;
      &lt;/SELECT&gt; 
  </code></pre>
  
  <p>Any help much appreciated.</p>
  
  <p>Thanks JC</p>