I’m having problems getting the rows updated automatically after i edit it from the grid.
I follow the the tutorial shown on the dhtmlxconnector intro site and even read the previous posts about almost similar situation, but no luck. I’ve been on his for 10+ hours and felt if i could reach anyone for one last help.
My code is set up like this:
–sample.html–
test <script src="dhtmlxGrid/codebase/dhtmlxcommon.js"></script>
<script src="dhtmlxGrid/codebase/dhtmlxgrid.js"></script>
<script src="dhtmlxGrid/codebase/dhtmlxgridcell.js"></script>
<script src="dhtmlxGrid/codebase/ext/dhtmlxgrid_srnd.js"></script>
<script src="dhtmlxDataProcessor/codebase/dhtmlxdataprocessor.js"></script>
<script src="dhtmlxDataProcessor/codebase/dhtmlxdataprocessor_debug.js"></script>
<script src="dhtmlxConnector_php/codebase/connector.js"></script>
</head>
<body>
<div id="gridbox" style="width:632px; height:370px;"></div>
<script>
mygrid = new dhtmlXGridObject('gridbox');
mygrid.setImagePath('dhtmlxGrid/codebase/imgs/');
mygrid.setHeader("id,nm,code,num_val");
mygrid.setInitWidths("100,*")
mygrid.setColTypes("ed,ed,ed,ed");
mygrid.setSkin("modern")
mygrid.init();
mygrid.enableSmartRendering(true);
mygrid.loadXML("connector.php");
myDP = new dataProcessor("connector.php");
myDP.setUpdateMode("row",true);
myDP.enableDebug(true);
myDP.init(mygrid);
</script>
</body>
–connector.php–
<?php require_once("dhtmlxConnector_php/codebase/grid_connector.php"); $res=mysql_connect("localhost","root",""); mysql_select_db("sampledb"); $grid = new GridConnector($res); $grid->dynamic_loading(100); $grid->enable_log("temp.log",true); $grid->render_table("products","","id,nm,code,num_val"); ?>I’ve checked numerous time for the paths for each includes file and seems correct.
I’ve compared the code with the introduction video to dhtmlxconnector and other posts and all the necessary codes seems correct.
When i run the sample.html, i see the grid with all the populated datas from my database.
However, if i edit one row, the dataprocessor debugger tells me the following:
Current state
ID:1275363956_0 Status: updated, errorCurrent mode: row
Log:
Initiating data sending for all rows
Initiating data sending for all rows
row 1275363956_0 marked [updated,valid]
Initiating data sending for all rows
Sending all data at once
Server url: connector.php?editing=true parameters
1275363956_0_gr_id=1275363956_0
1275363956_0_c0=47083
1275363956_0_c1=Chrendrams
1275363956_0_c2=jx87271
1275363956_0_c3=109
1275363956_0_!nativeeditor_status=updated
ids=1275363956_0
Server response received details
<?xml version='1.0' ?><data><action type='error' sid='1275363956_0' tid='1275363956_0' ></action></data>
Action: error SID:1275363956_0 TID:1275363956_0
row 1275363956_0 unmarked [updated,error]
…and would not update the cell when i refresh my browser.
If i disable the disable the dataprocessor debug mode from my above code “myDP.enableDebug(true);”, the row i edited stays bold.
And when i refresh, it still doesn’t update.
I’ve read the documentation where it shows that bold row necessary means its updated, but not saved.
How can I go about resolving this.
Any feedback would be greatly appreciated.
Thank you.