Is there any way to make the error reported in an alert box or some other way?
Is there a way for removing the new item from the scheduler if the save process returned an error?
Is there any way to make the error reported in an alert box or some other way?
dp.attachEvent(“onAfterUpdate”, function(sid,tid,action,tag){
if (action == “error”)
alert(tag.firstChild.data);
})
Is there a way for removing the new item from the scheduler
Similar to above code, you can exec any calls against the grid from onAfterUpdate callback, sid parameter will contain ID of item in question.
In this case, $insertid is blank when it is a new record and it was not written. If it is editing or moving a record, $insertid = $id.
At the scheduler, the working code is this:
[code]dp.attachEvent(‘onAfterUpdate’, function(sid,action,tid,tag){
if (action == ‘error’){
var text=tag.firstChild.data;
if (text==’’) text=‘Error saving data’;
alert(text);
}
//always reload the saved item in order to ensure the colors are ok
if (tid!='')
scheduler.load('savedata.php?uid='+scheduler.uid()+'&sid='+tid);
else //if tid is empty, the item was never written
scheduler.deleteEvent(sid);
})
[/code]
Get a guaranteed answer from DHTMLX technical support team
under the most suitable support plan