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

Event Resize

Asked by Anonymous
17 years ago.
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.

Comment posted by Anonymous
17 years ago.


But the event resize event is triggering.

Comment posted by Dan Letecky
17 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.
This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.