We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

OnResizeStop and OnDragStop not working correctly

Thread ID:

Created:

Updated:

Platform:

Replies:

117954 Jan 13,2015 12:07 PM UTC Jan 27,2015 06:25 AM UTC ASP.NET MVC 5
loading
Tags: Schedule
Ralph Mounzer
Asked On January 13, 2015 12:07 PM UTC

With a schedule control in ASP MVC, the OnResizeStop event does not return the correct arguments.

For example:
For a given appointment with StartTime=s to EndTime=e1.
When resized so that EndTime is now equal to  e2 the args.appointment passed to OnResizeStop shows EndTime=e1.
Now when resized so that EndTime is now equal to e3 args.appointment passed to OnResizeStop shows EndTime=e2.
It seems that the args.appointment is returning the appointment object before the resize operation not after it.

The same behavior occurs with the OnDragStop event.

What would be the right procedure to get the exact StartTime and EndTime of an appointment after resize?

Thank you.

Sarath Kumar P K [Syncfusion]
Replied On January 14, 2015 12:16 PM UTC

Hi Ralph,

Thanks for using Syncfusion products.

We regret for the inconvenience caused, as we are able to reproduce the reported issue. Therefore, we suggest you to use the actionComplete event to get the updated start/end time, instead of using the resizeStop and dragStop events. Refer the below code snippet to get the updated time in the actionComplete event.

<code>

@(Html.EJ().Schedule("Schedule1")

        .Width("100%")

        .Height("525px")

        .EnableRTL(false)

        .AllowKeyboardNavigation(false)

        .TimeMode(Syncfusion.JavaScript.TimeMode.Hour12)

        .CurrentDate(new DateTime(2014,6,2))

              .ScheduleClientSideEvents(evt =>

                  evt.ActionComplete("onActionComplete")

                  .ResizeStop("onResizeStop")

                  .DragStop("onDragStop"))

        .AppointmentSettings(fields => fields.Datasource(Model)

            .Id("Id")

            .Subject("Subject")

            .StartTime("StartTime")

            .EndTime("EndTime")

            .AllDay("AllDay")

            .Recurrence("Recurrence")

            .RecurrenceRule("RecurrenceRule"))

            )

 

<script>

    function onActionComplete(args) {

        if (args.requestType == "appointmentResize" || args.requestType == "appointmentDrag")

        {

            var appointment = (args.requestType == "appointmentResize") ? args.data[0] : args.appointment[0];

            alert("Subject: " + appointment.Subject + "\nStartTime: " + appointment.StartTime + "\nEndTime: " + appointment.EndTime);

        }

    }

</code>

And for your reference we have prepared the sample, which can be downloaded from the following location.

http://www.syncfusion.com/downloads/support/directtrac/general/ScheduleSample10700227.zip

Kindly refer the sample and let us know if you need any further assistance on this.

Regards,

Sarath Kumar P K



Ralph Mounzer
Replied On January 14, 2015 08:04 PM UTC

Thank you Sarath,
It works now.
But then the issue becomes that setting the args.cancel to true does not reverse the resize action.
After the user resizes, I post the changes to the server. If for some reason the post fails then I need to cancel the resize.
Any workarounds for this?
Ralph

Velmurugan S [Syncfusion]
Replied On January 19, 2015 12:38 PM UTC

Hi Ralph,

Thanks for your update.

We regret for the inconvenience caused, as we are able to reproduce the reported issue. We have already logged a defect report for this and therefore, the fix for this issue will be included in our next Main release Volume-1, 2015.

We appreciate your patience until then.

Regards,

Velmurugan



Ralph Mounzer
Replied On January 26, 2015 10:19 PM UTC

Thank you for your reply.
When is  Volume-1, 2015 scheduled for release?


Velmurugan S [Syncfusion]
Replied On January 27, 2015 06:25 AM UTC

Hi Ralph,

We have planned to release our next Volume 1, 2015 Essential Studio release at the end of the month March.

Please let us know if you need any further assistance on this.

Regards,

Velmurugan



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;