Hello!
I’m trying to update data from a grid, but data does not update on database.
the grid and dataprocessor code is the following:
gRelatorio = xRelatorio.cells(“a”).attachGrid();
gRelatorio.setImagePath(“/codebase/imgs/”);
gRelatorio.setHeader(“Relatorio, A”);
gRelatorio.attachHeader(“#connector_text_filter,#connector_text_filter”);
gRelatorio.setInitWidths(“510,30”);
gRelatorio.setColTypes(“ro,ch”);
gRelatorio.setColAlign(“left,center”);
gRelatorio.setColSorting(“connector,connector”);
gRelatorio.attachEvent(“onXLS”, function() { xRelatorio.cells(“a”).progressOn(); });
gRelatorio.attachEvent(“onXLE”, function() { xRelatorio.cells(“a”).progressOff(); });
gRelatorio.init();
gRelatorio.enableSmartRendering(true);
gRelatorio.loadXML(“/grade/relatorio.php”);
dp = new dataProcessor(“/grade/relatorio.php”);
dp.enableDataNames(true);
dp.init(gRelatorio);
the relatorio.php code is the following:
$conn = new PDO(‘mysql:host=’ .
$conf->resources->db->params->host . ‘;dbname=’ .
$conf->resources->db->params->dbname . ‘;port=’ .
$conf->resources->db->params->port,
$conf->resources->db->params->username,
$conf->resources->db->params->password);
$grid = new GridConnector($conn, “PDO”);
$grid->enable_log(“log_relatorio.txt”,true);
$grid->dynamic_loading(100);
$grid->render_table(“nivel_relatorio”, “id”, “id_relatorio,acesso”);
the grid loads correctly, all data is displayed. But when I edit the checkbox no changes to database are made. I have debbuged dataprocessor enabled, and logs enabled.
the log output of load and update is the following:
====================================
Log started, 29/05/2011 12:05:20
SELECT id,id_relatorio,acesso FROM nivel_relatorio LIMIT 0,100
SELECT COUNT(*) as DHX_COUNT FROM nivel_relatorio
Done in 0.00281000137329s
Log started, 29/05/2011 12:05:25
DataProcessor object initialized
ids => 11
Row data [11]
Edit operation finished
Done in 0.00236296653748s
See above that no row data was sended. This is stranger to me.
the following is the debug window of dataprocessor debugger:
Log:
row 10 marked [updated,valid]
Initiating data sending for 10
Initiating data sending for all rows
Sending all data at once
Server url: /grade/relatorio.php?editing=true parameters
Server response received details
<?xml version='1.0' ?>
See above that no update was done, because xml response points to no row updated.
There are some part that I doing wrong? Please tell me if I’m forget something.
Eliéser