title: jqgrid, help adding , edditing, and deleting rows
body: <p>hello i trying for two weeks that my jqgrid works without success. i dont know much about this lenguaje. i make that the grid bring me the data from de database but  every time that i edit or add a new row the change is no applie to the database only change in the screen. then i refresh the page the chage desappears. help!!!!</p>
  
  <hr>
  
  <p>this is the datos.js</p>
  
  <pre><code>jQuery("#grid_id").jqGrid({
      url:'conec.php',
  datatype: "json",
  colNames:['id','name', 'record_id', 'created_at','updated_at','deleted_at'],
  colModel:[
      {name:'id',index:'id', width:55,editable:false,editoptions:{readonly:true,size:10}},
      {name:'name',index:'name', width:80,editable:true,editoptions:{size:10}},
      {name:'record_id',index:'record_id', width:90,editable:true,editoptions:{size:25}},
      {name:'created_at',index:'created_at', width:60, align:"right",editable:true,editoptions:{size:10}},
      {name:'updated_at',index:'updated_at', width:60, align:"right",editable:true,editoptions:{size:10}},
      {name:'deleted_at',index:'deleted_at', width:60,align:"right",editable:true,editoptions:{size:10}},
      ],
  rowNum:10,
  rowList:[10,20,30],
  pager: '#gridpager',
  sortname: 'id',
  viewrecords: true,
  sortorder: "desc",
  caption:"Navigator Example",
  editurl:"editurl.php",
  height:210});
  jQuery("#grid_id").jqGrid('navGrid','#gridpager',
  {}, //options
  {height:280,reloadAfterSubmit:false}, // edit options
  {height:280,reloadAfterSubmit:false}, // add options
  {reloadAfterSubmit:false}, // del options
  {} // search options
  );
  </code></pre>
  
  <hr>
  
  <p>this is the index.html</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
  &lt;title&gt;My First Grid&lt;/title&gt;
  
  &lt;link rel="stylesheet" type="text/css" media="screen" href="css/ui-lightness/jquery-ui-      1.8.6.custom.css" /&gt;
  &lt;link rel="stylesheet" type="text/css" media="screen" href="css/ui.jqgrid.css" /&gt;
  
  &lt;style type="text"&gt;
      html, body {
      margin: 0;          /* Remove body margin/padding */
      padding: 0;
      overflow: hidden;   /* Remove scroll bars on browser window */
      font-size: 75%;
      }
  &lt;/style&gt;
  
  &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
  &lt;title&gt;Documento sin t&amp;iacute;tulo&lt;/title&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
   &lt;table id="grid_id"&gt;&lt;/table&gt;
   &lt;div id="gridpager"&gt;&lt;/div&gt;
  &lt;/body&gt;
   &lt;script src="js/jquery-1.4.2.min.js" type="text/javascript"&gt;&lt;/script&gt;
   &lt;script src="js/i18n/grid.locale-en.js" type="text/javascript"&gt;&lt;/script&gt;
   &lt;script src="js/jquery.jqGrid.min.js" type="text/javascript"&gt;&lt;/script&gt;
   &lt;script src="datos.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;/html&gt;
  </code></pre>
  
  <hr>
  
  <p>this is the conec.php (the conection)</p>
  
  <pre><code>&lt;?php
   include_once 'lib.php';
  
   $conexion= mysql_connect('localhost', 'root', '');
   mysql_select_db("taskmaker", $conexion);
   $result = mysql_query("SELECT id, name, record_id, created_at, updated_at, deleted_at       FROM Team", $conexion);
  
  $i=0;
  while($row = mysql_fetch_array($result,MYSQL_ASSOC)) {
  $responce-&gt;rows[$i]['id']=$row[id];
  $responce-&gt;rows[$i]   ['cell']=array($row[id],$row[name],$row[record_id],$row[created_at],$row[updated_at],$row[d  eleted_at]);
  $i++;
  }
  echo json_encode($responce);
  ?&gt;
  </code></pre>
  
  <hr>
  
  <p>this is the lib.php</p>
  
  <pre><code>&lt;?php
  $dbhost = "localhost";
  $dbuser = "root";
  $dbpassword = "";
  $database = "taskmaker";
  ?&gt;
  </code></pre>
  
  <p>thats all. </p>