where to get the source for update.php ?

This this page, it talks about using dataprocessor to save the data
dhtmlx.com/docs/products/dht … _init.html

One of the source code is this…
myDataProcessor = new dataProcessor(“php/update.php”);

May i know where to get the source for update.php??

Check dhtmlxGrid package
dhtmlxGrid\04_dataprocessor\php\

from which url do i download that package?
the dhtmlxGrid.zip 2.5 i downloaded does not have such a folder as 04_dataprocessor.

what is the difference btw dhtmlconnector and dataprocessor?
dhtmlx.com/docs/products/dhtmlxC … x.shtml?mn
i read in the above url that with dhtmlconnector, saving data is easy. All i want to be able to do is to save new rows or edited rows in the grid back to the database. If i use dhtmlconnector, do i still need to use dataprocessor?

The data saving logic consists from two parts

a) dataprocessor resides on client side and send updated info by ajax, controls update state, results of operations etc.

b) connectors resides on server side and can be integrated with dataprocessor

Basically when you are using connectors, most probably you are using dataprocessor as well.

If i use dhtmlconnector, do i still need to use dataprocessor?
Yep, but you need to know only two lines

var dp = new dataProcessor(“connector_file.php”);
dp.init(mygrid);

all others will be configured automatically.

thanks i have manage to get dhtml connector to work. i get edit the grid and it gets instantly updated to the database.

however, when i insert a new row with mygrid.addRow, it doesn’t update to the database. i can see an extra row with red fonts(values), and i can add many rows, but when i refresh the browser, all the rows are gone. why is it so? does it mean that dhtml connector(with data processor only can update edited rows but not add new rows?

Try to enable server side logging and provide us content of the log file.

Where should i put this to enable server side logging? connector.php?
$gridConn->enable_log(“path to log file”);

You should put this line at the file where you initialize $gridConn variable

i tried enable server side logging but no log file appear.

any the original test.html is this

var mygrid;

function doInitGrid(){

mygrid = new dhtmlXGridObject('products_grid'); 

mygrid.setImagePath("codebase/imgs/"); 

mygrid.setHeader("Product Name,Internal Code,Price"); 

mygrid.setInitWidths("*,150,150"); 

mygrid.setColAlign("left,left,right");

mygrid.setColTypes("ed,ro,ed");


mygrid.setSkin("modern");

mygrid.setColSorting("str,int,int"); 
mygrid.attachEvent("onEnter", onentercell);
mygrid.init();

mygrid.enableSmartRendering(true);

mygrid.loadXML("connector.php");
var dp = new dataProcessor("connector.php");
dp.init(mygrid);

}

var new_or_edit = “none”;

function var_new(){
new_or_edit = “new”;
var last_id=mygrid.getRowId(mygrid.getRowsNum()-1);
last_id = last_id + 1;
mygrid.addRow(last_id,“a,a,a”); // next row id
mygrid.selectCell(mygrid.getRowIndex(last_id), 0);
mygrid.editCell();
mygrid.editor.obj.select(); //highlight editor text

}


and the connector.php

<?php require_once("../dhtmlxConnector_php/codebase/grid_connector.php"); $res=mysql_connect("localhost","admin","admin"); mysql_select_db("test"); $grid = new GridConnector($res); $grid->dynamic_loading(100); $grid->render_table("invmst","ID","description,sku,short_description"); ?>

wat am i doing wrong?
the grid can update to database but cannot update an added row. in the grid i can see the added row but the text is red in color and i can add many rows but once i refresh, all the added rows are gone and not updated to database. however any edition to the original present rows stays!

please help.
thank you

i tried enable server side logging but no log file appear.
Please check this tutorial docs.dhtmlx.com/doku.php?id=dhtm … nd_logging