Hello:

I am using Jqgrid, and testing how the editing feature work.  When the
row is clicked, it shows the form to edit.  However, entering the info
and submitting does not work.

http://pssnet.com/~devone/ajqtable/editgrid.html (Also see below)

At the php side I am simply trying to get those parameters and write
to db.
$var1 = $_POST['service_id'];
$var2 = $_POST['name'];

Any help appreciated.  Thanks.

Regards,
Nat

jQuery(document).ready(function(){

var lastsel;

jQuery("#list2").jqGrid({
    url:'summary3.php?nd='+new Date().getTime(),
    datatype: "json",
    colNames:['service_id', 'Services'],
    colModel:[
        {name:'service_id',index:'service_id', width:75, editable:
true},
        {name:'name',index:'name', width:175, editable: true},
                ],
    pager: jQuery('#pager2'),
    rowNum:10,
    rowList:[10,20,30],
    imgpath: 'themes/sand/images',
    sortname: 'id',
    viewrecords: true,
         sortorder: "asc",
         editurl: 'editgrid.php',
         myType: "POST",

   caption: "Service Types"
   });

 $("#bedata").click(function(){
 var gr = jQuery("#list2").getGridParam('selrow');
 alert(gr);
 if( gr != null )
 jQuery("#list2").editGridRow(gr, {editData:{name: "name", service_id:
"service_id"}},{height:280,reloadAfterSubmit:true});
 else alert("Please Select Row");
 });

});  <!-- End Firs JQuery -->

Reply via email to