title: using radio buttons in php jqGrid
body: <p>I have a jqgrid using php. In one of the columns i want to use two radio buttons (Yes/No). I have used a custom formatter for this..</p>
  
  <pre><code>$(function () {
    function myelem (value, options) {
      var radio1 = document.createElement('input');
      radio1.id = 'radY';
      radio1.type = 'radio';
      radio1.name = 'appr';
      radio1.value = 'Yes';
  
      var radio2 = document.createElement('input');
      radio2.id = 'radN';
      radio2.type = 'radio';
      radio2.name = 'appr';
      radio2.value = 'No';
  
      var label1 = document.createElement('label');
      label1.setAttribute('for', radio1.id);
      label1.innerHTML = 'Yes';
  
      var label2 = document.createElement('label');
      label2.setAttribute('for', radio2.id);
      label2.innerHTML = 'No';
  
      var container = document.createElement('div');
      container.appendChild(radio1);
      container.appendChild(label1);
      container.appendChild(radio2);
      container.appendChild(label2);
  
      return container;
    }
  
    function myvalue(elem, operation, value) {
      if(operation === 'get') {
        return $(elem).val();
      } 
      else if(operation === 'set') {
        $('input',elem).val(value);
      }
    }
  
    $("#list").jqGrid({
      url: "fetch.php?sqlselect=1",
      datatype: "json",
      mtype: "GET",
      colNames: ["Role", "Region", "Approved"],
      colModel: [
        { name: "role", width: 60,editable:true},
        { name: "region", width: 60,editable:true},
        { name: "approved", width:250, editable:true, edittype:"custom", editoptions: {custom_element: myelem, custom_value:myvalue}}
       ],
     onSelectRow: function(id){
          if(id &amp;&amp; id!==lastSel){
        jQuery('#list').restoreRow(lastSel);
        lastSel=id;
        }
          jQuery('#list').jqGrid('editRow',id,
        {
      keys : true,
      url : "edit.php"
        } );
      },
  
      .............
  </code></pre>
  
  <p>Everything works fine when edited except the radio button column. I can see the radio buttons onClick. But once i press enter the radio button value is not passed to my edit page. That's understandable coz myval function is reading the div element and not a radio element. Since there are two radio buttons (with the same name, so at point only one can be checked Yes/No), and it's not a single entity like a text box, in order to 'return' a myelem i had to use a div. Is there a way I can do this where i can fetch the radio element value?</p>