Call dataprocessor with no grid changes

Hi guys, in one page i have the next code

gridliq = new dhtmlXGridObject(‘tablainfoliq’);
gridliq.setImagePath("./…/…/images/");

gridliq.init();
gridliq.clearAll();
myDataProcessor = new dataProcessor("./dataprocessor_liquidaciones.php");
myDataProcessor.setTransactionMode(“POST”, true);
myDataProcessor.setUpdateMode(“off”);
myDataProcessor.enableDataNames(true);
myDataProcessor.init(gridliq);
gridliq.parse(opener.xml_data,calculateFooterValues);

its possible to send all data at once of my grid but with any changes on it?
I mean, load the grid.parse and in one button call the dataprocessor?, remember any changes on my grid was made it.
How fire dataprocessor??

i was checking myDataProcessor.setUpdated(1, true); but i dont want to make this on a cicle for all rows on my grid and then call dataprocessor.
Any ideas?

Best regards

Euler Sánchez G.

its possible to send all data at once of my grid but with any changes on it?
The only way to do it is to use setUpdated(1, true);

The only way to do it is to use setUpdated(1, true);

:frowning:

ok, i’m doing the next code in one button

var selected_rows = gridliq.getCheckedRows(0).split(",");
for(var idx in selected_rows)
{
myDataProcessor.setUpdated(idx+1, true);
}
myDataProcessor.sendData();

but i’m getting the next error on dataprocessor.js on line 425

r is null
for (var i=0; i<r.childNodes.length; i++)

any ideas?

Please check if “idx+1” is a correct id of the row

idx has the value:

for instance, for two rows on my grid

alert (idx); give me 0 and 1, so i’m adding 1 to idx+1 on myDataProcessor.setUpdated(idx+1, true);

i’m doing something wrong?

its another way to get all rows id’s?

thanks in advance for your quick reply.

Euler

i changed my code for this

for (var i=0; i<gridliq.getRowsNum(); i++){
var id = gridliq.getRowId(i);
myDataProcessor.setUpdated(id, true);
}

myDataProcessor.sendData();
but with no much success, i’m getting the same error in the same line on dataprocessor

Any ideas?

Following code works as expected at local example

function update_all(){ mygrid.forEachRow(function(id){ myDataProcessor.setUpdated(id, true); }) }

Thanks in advance for your help, now it works as expected

Best regards