Hi Stanislav,
heres the client side log, in this example I selected a task and the default value pulled from the server for the second cell was 25, I then changed this to 42 in the grid. As you can see this new value was sent up to the server - but it wasn’t updated in the table… I also have the server code below…
Log:
row 27000 marked [inserted,valid]
row 27000 marked [updated,valid]
Initiating data sending for all rows
Sending all data at once
Server url: clientdetail.php?editing=true&action=clienttasks&ClientID=64&uid=1272308533161 parameters
27000_gr_id=27000
27000_c0=27
27000_c1=25
27000_c2=10
27000_!nativeeditor_status=inserted
27000_description=Site%2FSteel
ids=27000
Server response received details
<?xml version='1.0' ?><data><action type='inserted' sid='27000' tid='27000' ></action></data>
Action: inserted SID:27000 TID:27000
row 27000 unmarked [updated,valid]
row 27000 marked [updated,valid]
Initiating data sending for all rows
Sending all data at once
Server url: clientdetail.php?editing=true&action=clienttasks&ClientID=64&uid=1272308533161 parameters
27000_gr_id=27000
27000_c0=27
27000_c1=42
27000_c2=10
27000_!nativeeditor_status=updated
27000_description=Site%2FSteel
ids=27000
Initiating data sending for all rows
Sending all data at once
Server url: clientdetail.php?editing=true&action=clienttasks&ClientID=64&uid=1272308533161 parameters
Server response received details
<?xml version='1.0' ?><data><action type='updated' sid='27000' tid='27000' ></action></data>
Action: updated SID:27000 TID:27000
row 27000 unmarked [updated,valid]
SERVER CODE*
case "clienttasks":
//retrieve rates for this client
$GetRatesSQL = "select t1.DefRateID, t1.EntityID, t1.Rate, t1.Hours, t1.TaskID, t2.TaskDesc from calloutrates t1, tasks t2 where EntityID= $_GET[ClientID] and EntityType='Client' and t1.TaskID=t2.TaskID";
$resconn->event->attach("beforeUpdate","logTaskChange");
$resconn->event->attach("beforeDelete","logTaskChange");
$resconn->event->attach("beforeInsert","logTaskChange");
$resconn->sql->attach("Delete", "Delete from calloutrates WHERE DefRateID={DefRateID}");
$resconn->sql->attach("Insert", "Insert into calloutrates (`EntityType`, `EntityID`, `TaskID`, `Rate`, `Hours`) VALUES ('Client', '$_GET[ClientID]', '{TaskDesc}', '{Rate}', '{Hours}')");
$options = new OptionsConnector($connection);
$options->render_table("tasks","TaskID","TaskID(value),TaskDesc(label)");
$resconn->set_options("TaskDesc",$options);
$resconn->render_sql($GetRatesSQL,"DefRateID",'TaskDesc,Rate,Hours');
break;
- Could it be to do with my custom code -
$resconn->sql->attach(“Insert”, “Insert into calloutrates (EntityType
, EntityID
, TaskID
, Rate
, Hours
) VALUES (‘Client’, ‘$_GET[ClientID]’, ‘{TaskDesc}’, ‘{Rate}’, ‘{Hours}’)”);
I’m not sure if/why I have this code… I don’t have a custom ‘update’ though…!