Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Rachel H. on Jan 16, 2009 09:26
open dhtmlx forum
Grid update - which cell was updated?

Hi,

I'm using the dhtmlxgrid and I'm doing data updates on the back end when someone makes a change in one of the cells.

My problem is that the data I'm getting in the GET var doesn't tell me which of the cells was updated. It gives me the row id and the ids of all the columns.

Here is the code to set up the Data Processor:

myDataProcessor = new dataProcessor("comm_processor.php");
myDataProcessor.enableDataNames(true);
myDataProcessor.setTransactionMode("GET");
myDataProcessor.init(mygrid);

myDataProcessor.setOnAfterUpdate(afterUpdate);


In my comm_processor.php file where I want to do my inserts, I am printing out the GET variable and there is nothing in there to tell me which cell was the edited cell.

If anyone could help I would really appreciate it.

Thanks!

Answer posted by Support on Jan 16, 2009 09:45
Grid sends all data from updated row, if necessary you can add next line to the init

            myDataProcessor._changed = true;

As result dataprocessor will send data only from updated column. 


Answer posted on Jan 16, 2009 09:52

Ok, so I changed my code to this:

 

        myDataProcessor = new dataProcessor("comm_processor.php");
        myDataProcessor.enableDataNames(true);
        myDataProcessor.setTransactionMode("GET");
        myDataProcessor.init(mygrid);
        myDataProcessor._changed = true;

I still get the exact same info in the GET var.  Sorry but can you please clarify if I did something wrong?

Answer posted by Support on Jan 19, 2009 01:29
The code is correct. 
It may not work only if you are using pretty outdated version of dataprocessor. 
Just to be sure latest version of related js file sent by email.