DataProcessor set updated status to an invalid status row

Hello,

I am using Dhtmlx PRO 2.5 version.

I have the following problem:

I have a row father with two row sons inserted in the grid (all three rows are new, and are not in the database).
When I try to save the rows and the father has his name equal to one row previously inserted, the server returns an error (an expected error).
From the server side, I return the error when trying to insert the father, and also return the children as “invalid”, since there is no valid father to be inserted with.
But the problem appears when I modify the father with a valid name (client side) and try to save: the children don’t appear in the dataprocessor.

I tryed to set the children as updated (and not invalid) in the function that calls for every invalid row (using “setUpdated(rowId,state,mode)”), but it seems that the dataprocessor calls that method after calling the function and overrides what I’ve set.

What do you suggest I do?

The next call against row with invalid status

dp.setUpdated(rowId,true,“inserted”);
or
dp.setUpdated(rowId,true,“updated”);

will mark row as updated and clear the previosly set “invalid” flag.

Normally any call of setUpdated with true as 2nd parameter, will clear invalid or error flag

Yes, I’ve tryed that, but after calling my function (which sets the row as updated the way you suggest dp.setUpdated(rowId,true,“inserted”)), calls a function called “afterUpdateCallback()” and makes a “this.setUpdated(sid, false)” (which overrides what I’ve done).

If you have auto-update mode on , the call of setUpdated will trigger data sending.
afterUpdateCallback is called only after receiving response from the server side.

Thanks, I’ll try that and see if it works.