I have some problem, I want to delete some row using JqGrid plugin
Here's my php delete function, the database colum for id is idms_department
if($oper == 'del'){
   $deptid = $_REQUEST['idms_department'];
   $del = "DELETE FROM ms_department WHERE idms_department =" . $deptid;
   if(mysql_query($del)){
     "Delete Successfull"; 
   } else {
     die("Error Delete: " .mysql_error()."SQL : " .$del);
   }
     mysql_close();
}
and my jqgrid setting
  <script type="text/javascript">
        $(document).ready(function() {
            //alert("start");
            jQuery("#departments").jqGrid({
                mtype:'GET',
                url:'functions/get_dept.php',
                editurl:'functions/edit_dept.php',
                datatype: "JSON",
                colNames:['Department ID','Department'],
                colModel:[
                    {name:'idms_department',index:'idms_department', width:150, editable:true,add:true, del:true, key:true},
                    {name:'department',index:'department', width:800,editable:true, add:true, del:true}     
                ],
                loadComplete: function () {
                alert("OK");
                },    
                loadError: function (jqXHR, textStatus, errorThrown) {
                    alert('HTTP status code: ' + jqXHR.status + '\n' +
                          'textStatus: ' + textStatus + '\n' +
                          'errorThrown: ' + errorThrown);
                    alert('HTTP message body (jqXHR.responseText): ' + '\n' + jqXHR.responseText);
                },
                rowNum:10,
                rowList:[5,10,15],
                pager: '#pager-departments',
                sortname: 'idms_department',
                viewrecords: true,
                jsonReader: {repeatitems: true, idms_department: "idms_department" },
                sortorder: "asc",
                caption:"Example Departments"
            });
            jQuery("#departments").jqGrid('navGrid','#pager-departments',{edit:true,add:true,del:true});
            jQuery("#departments").jqGrid('gridResize',{minWidth:350,maxWidth:850,minHeight:80, maxHeight:350});
            //alert("end");
        });
    </script>
How to get value of idms_department, because I see in my firebug, the idms is not recognizing (null) so the sql function is falling.