jqGrid, rowedit, php posts names instead of values to the db

Question!

I need to dynamically edit and change the server data.

http://pssnet.com/~devone/ajqtable/editgrid2.html

Right now, when the fields get edited php posts names instead of values to the db. My assumption is that on submit, the editurl will be called upon with the changed data. I read in the docs that I may have to add an onSubmit function (as shown below).

<?php
  include("dbc.php");
  $var1 = $_POST['service_id'];
  $var2 = $_POST['name'];

  // $var1 = "abc";
  // $var2 = "xyz";

 mysql_query("INSERT INTO
 testwrite (service_id, name) 
 VALUES('$var1', '$var2') ")
 or die(mysql_error());
?>

onclickSubmit : function(eparams) 
{
 var retarr = {};
 // we can use all the grid methods here
 //to obtain some data
 var sr = jQuery("#grid_id").getGridParam('selrow');
 rowdata = jQuery("#grid_id").getRowData(sr);
 if(rowdata.somevalue=='aa') {
    retarr = {myname:"myvalue"};
}
return retarr;

Thank you for you help.

Regards, Nat



Answers


How about this: Edit project C's proj file to include an Exec MSbuild task that calls VS2005 devenv with /build switch to build project A and then copy the output files from project A build to a location where project C could find. You need to do in a build step in project C's proj file before project C is compiled, BeforeBuild maybe, so that project C can find the output of project A.



This video can help you solving your question :)
By: admin