Error when updating grid

when i update grid, dhtmlxprocessor_debug.js shows this error
Incorrect SID, row with such ID not exists in grid.

my server side page is

<?php //code below is simplified - in real app you will want to have some kins session based autorization and input value checking error_reporting(E_ALL ^ E_NOTICE); //include db connection settings require_once('config.php'); require_once('config_dp.php'); /*include("config/database.query.php");*/ function add_row(){ global $newId; $sql = "INSERT INTO tbl_Plant(Plant_Name,Plant_Address,Landline1,Landline2,Fax,Plant_Email) VALUES ('".$_GET["Plant_Name"]."', '".$_GET["Plant_Address"]."', '".$_GET["Landline1"]."', '".$_GET["Landline2"]."', '".$_GET["Fax"]."', '".$_GET["Plant_Email"]."'"; $res = mysql_query($sql); //set value to use in response $newId = mysql_insert_id(); return "insert"; } function update_row(){ $sql = "UPDATE tbl_Plant SET Plant_Name='".$_GET["Plant_Name"]."' WHERE Plant_Id=".$_GET["gr_id"]; $res = mysql_query($sql); return "update"; } function delete_row(){ $d_sql = "DELETE FROM tbl_Plant WHERE Plant_Id=".$_GET["gr_id"]; $resDel = mysql_query($d_sql); return "delete"; } //include XML Header (as response will be in xml format) header("Content-type: text/xml"); //encoding may differ in your case echo('<?xml version="1.0" encoding="iso-8859-1"?>');

$mode = $_GET[“!nativeeditor_status”]; //get request mode
$rowId = $_GET[“gr_id”]; //id or row which was updated
$newId = $_GET[“gr_id”]; //will be used for insert operation

case “inserted”:
//row adding request
$action = add_row();
case “deleted”:
//row deleting request
$action = delete_row();
//row updating request
$action = update_row();

//output update results
echo “”;
echo “”;
echo “”;


The code looks correct.

Can you provide a demo link or some kind of sample where issue can be reconstructed.