Cells not updating from grid to dataprocessor

Hello, I am trying to update a grid row via javascript. The row updates visually fine in the grid
In my php code for the update method, the cells values are not updated on the serverside. I’ve looked through the forums and I believe I am doing this correctly.

				my.cells(rowid,fieldindex1).cell.wasChanged = true;
				my.cells(rowid,fieldindex2).cell.wasChanged = true;


Any idea?



No dice, I tried that, still nothing gets updated on the server side. Here is my current code;

				grid.cells(rowid,timeindex).cell.wasChanged = true;
				grid.cells(rowid,statusindex).cell.wasChanged = true;
				// this shows True, for was changed

It’s like it is only sending the data as it came down. If I use the inline editing controls I have, it does send all the data over correctly to the serverside (which is php)


I found some more information. If I edit the row via javascript and then try to send it to server, nothing gets changed. If I then edit one of the inline edit controls, the post for that update does contain my changed value from my javascript based edit. So the data is in the grid, it just seems like the sendData() call is pulling the stale data somehow.

I think it might have something to do with the datastore.

Here is how i am populating the grid:

var logs = new dhtmlXDataStore({  

dp = new dataProcessor(“log_grid_connector_json.php”);

The strange thing is that editing of a single cell not through javascript does work fine.
The other strange thing, is that when I tried putting this line in dp.setUpdateMode(“row”); , the single cell editing stops working , and i get no post for the update at all.

I’m very confused, not sure what to do.

I figured out a work around. I had been trying to use the DataStore object with the json connector.
With this combination, you CANNOT change the grid via javascript for some reason. I used the grid connector instead, and it works fine.

I’d still like to know why using the datastore object does not update, when you update the grid. I’m assuming, I’d have to update the datastore object itself, and not the grid. But I could not find any good examples of updating the datastore via javascript.

The datastore object and senarios defined work great in this sample: docs.dhtmlx.com/doku.php?id=dhtm … erver-side , but I am starting to believe that if you diverage from the data binding and try to change the data through someother action, that things don’t work so well.

I still love this framework so far and plan to purchase a pro license.