search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Scheduler event diseapear after resize/move

Asked by Philippe
7 years ago.

Hi,

I test the new version (8.2.3519.1) to upgrade but I have a difference with an older one (6.7.2431.0) :

When I try to resize an event and if myCondition is not satisfied, the scheduler's events diseapear after the EventResize handler call.
It was not the same with the older version : the scheduler don't change if nothing append in the resize handler call.
____________
EventResizeHandling="CallBack"
OnEventResize="DayPilotScheduler1_EventResize"
____________
protected void DayPilotScheduler1_EventResize (object sender, DayPilot.Web.Ui.Events.EventResizeEventArgs e){
if (myCondition)
{
// update the database
DbUpdateEvent(e.Id, e.NewStart, e.NewEnd);

// reload events and refresh the scheduler on the client side
DayPilotScheduler1.DataSource = LoadData(); // your method
DayPilotScheduler1.DataBind();
DayPilotScheduler1.UpdateWithMessage("Event resized.");
}
}
____________

And the events rendering by default with the older version seems like to be "Progressive Event Rendering".
Now, the events rendering seems like to be dynamic but I have no "loading label" instead before.

LoadingLabelVisible="true".
No "DynamicEventRendering" or "DynamicLoading" properties defined.

  • Did I miss something ? Do I have to reload the entire scheduler ?
  • is there somewhere in the documentation the call order of the render handler ?

Best regards

Answer posted by Dan Letecky [DayPilot]
7 years ago.

Older versions of DayPilot stored event data in ViewState by default. Newer versions use StoreEventsInViewState property to control the behavior. By default it is set to "false".

You can enable the old behavior:

StoreEventsInViewState="true"

However, this might cause performance issues (everything has to be encoded and sent back and forth with every request, then decoded on the server side).

It would be more efficient to reload the events from the database every time:

protected void DayPilotScheduler1_EventResize (object sender, DayPilot.Web.Ui.Events.EventResizeEventArgs e){ 
  if (myCondition) 
  { 
    // update the database 
    DbUpdateEvent(e.Id, e.NewStart, e.NewEnd);
  } 

  // reload events and refresh the scheduler on the client side 
  DayPilotScheduler1.DataSource = LoadData(); // your method 
  DayPilotScheduler1.DataBind(); 
  DayPilotScheduler1.UpdateWithMessage("Event resized."); 
}

The loading label is now only displayed during a callback (if it takes more than 100ms).

Answer posted by Anonymous
7 years ago.

Hi,
great, it works now !
Thank you for your quick answer and your explanations.

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.