I have searched the forum for a straight solution to the following:
When an event is created, the database does several alterations to the data through stored procs. Because the event is not reloaded automatically after creation, some aspects of the new event are not present.
I can’t use the clearAll() and reload the entire calendar xml as that creates a very jarring experience for the users.
How can I “clear” the new event from the calendar and replace it with a targetted reload from the database after creation? I have tried using an event_id targetted xml load from the source on after event created, but although it makes the call, the event is not updated.
the event is not updated
If id of event on client side and id in the incoming xml is the same - existing event will be updated with new info from incoming xml. So just be sure that ID is the same
If I un-comment the
//scheduler.clearAll();
the line after is triggered and the calendar is cleared and the correct single event is loaded, but if I leave it commented, the
scheduler.load("SaveLoad2.asp?evid="+tid+" ");
line is ignored completely.
How do I make the
scheduler.load("SaveLoad2.asp?evid="+tid+" ");
line trigger WITHOUT using the clearAll() ?
If you are using scheduler.setLoadMode - scheduler will check currently visible range and will load data only if it was not loaded yet. ( it is useful for dynamic loading )
By clearing scheduler._loaded you are clearing local cache, so scheduler may call to the server side, for some date ranges, second time. ( it will not cause problems, just extra client-server communications )
I think you can use the next logic
scheduler.setLoadMode(false);
scheduler.load(...some url...);
scheduler.setLoadMode("month");//or any other necessary value
Such logic will temporary disable dynamic loading, so it will not affect you direct load call.
tried the suggested option, but no dice. The reload of the event then does not trigger. Unless I run into massive server traffic issues, I will have to stick with my mod. Thanks anyways. maybe my solution will help someone else too.