Home Unanswered Active Tags New Question

Event Resize

Hi,
Still no luck
The code as follows:
protected void DPC_EventResize(object sender, DayPilot.Web.Ui.Events.EventResizeEventArgs e)
{
DayPilotCalendar d = sender as DayPilotCalendar;
if (null != d)
{
DataSet dsEvent = (DataSet)d.DataSource;
d.DataSource = dsEvent;
d.DataBind();
d.Update();
}
}

And I am assigning the property while creating the dynamic object:

dpc.EventResizeHandling = DayPilot.Web.Ui.Enums.UserActionHandling.CallBack;
dpc.EventResize += new EventResizeEventHandler(DPC_EventResize);

however its still not resizing when try to resize the events.

I am not updating the any DB side only resize the events only.

Asked by Anonymous 4 years ago.
Replies


But the event resize event is triggering.

Comment posted by Anonymous 4 years ago.
It is necessary to make changes in the data source because DataBind() just loads the data again. No change in the data source means no change in the calendar.

Please note that this doesn't do anything:

DataSet dsEvent = (DataSet)d.DataSource;
d.DataSource = dsEvent;

It equals to d.DataSource = d.DataSource;

Please take a look at the samples in Demo directory in DayPilot package. It works without a database - the dataset is loaded with a new session and then it's modified by event handlers.

If there is anything specific you want to achieve, please post more details.
Comment posted by Dan Letecky 4 years ago.
New Reply
This reply is
Your name (optional):

DayPilot for ASP.NET WebForms, DayPilot for ASP.NET MVC, DayPilot for Java