Rerender recurring event

Hello! :slight_smile:

My scenario is:

  1. Add recurring event with some instances
  2. Drag one instance (new event with pid is created)
  3. Remove dragged instance

Instance is deleted, but I cannot see original one unless I update the page. Is it possible to rerender recurring event and all of it instances?

If you are removing the dragged instance scheduler will not recreate original event position, it will delete the instance and you will have a “hole” in the serie.

To restore the original position of all instances, you can edit the series ( trigger the edit by dbl-click or button click and select “edit series” ) After saving serie all previosly changed or deleted instances will be restored to the original position and state.

If you want to restore a some specific instance you need to delete the related record in DB and reload the scheduler ( this can’t be done through UI )

it’s unfortunate that there is no updateRecurringEvent() method :frowning: It would be quite useful.
For user it is a bit confusing, that he sees different event before and after page refresh.

I’m not quite sure about your situation, but you can always call something like

scheduler.clearAll() scheduler.load("data.php");

to reload all data in scheduler without page reloading.

Yes, I know it :slight_smile: Thank you.
But I need scheduler to update a single event. So it doesn’t change current week/day to default. In perfect case even without flickering.

The above code will not change current date, but may cause visible flickering.
You can use a bit more complicated code for more smooth updates

dhtmlxAjax.get("data.php", function(loader){ scheduler.clearAll(); scheduler.parse(loader.xmlDoc.responseText); })

with such code there will not be any visible flickering

Oops! I didn’t know, that clearAll() and parse() don’t change current date. :blush:
Thank you very much Stanislav.