Prevent multiple appointments from being resized

4 posts, 1 answers
  1. Håkan
    Håkan avatar
    183 posts
    Member since:
    May 2011

    Posted 02 Feb 2012 Link to this post

    Hi,

    I want to prevent the user from selecting multiple appointments and drag or resize them, only one at a time is allowed.
    I have created a custom DragDropBehavior and overloaded the CanStartDrag and CanStartResize methods.
    In CanStartDrag I do this check:

    if (state.DraggedAppointments.Count() > 1)
      return false;

    But if I do the same check in CanStartResize, the count is 0.
    It seems that resized appointments are not in the DraggedAppointments collection.
    Is there any other way I can check this?

    Regards,
    Håkan
  2. Answer
    Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 07 Feb 2012 Link to this post

    Hello Hakan,

    RadScheduleView will resize ony the appointment that is being resized, even if you select multiple appointments. Unfortunately we do not provide API to change this behavior even though it is good. The resized appointment instance can be accessed through the DragDropState.Appointment property, but the rest of the selected appointments cannot be accessed for a resize operation.

    I created a sample application that demonstrates two different approaches:
    1) Completely disable the multiple selection in the ScheduleView - check the CustomAppointmentSelectionBehavior class. If you apply this, the user will not be able to select multiple appointments.
    2) Drag only a single appointment, while unselecting the rest - check the CustomDragDropBehavior. If you apply this the user will be able to select multiple appointments, but if it starts a drag-drop operation, only the appointment that is under the mouse will remain selected and dragged. The resize operation will be as it is now.

    Kind regards,
    Valeri Hristov
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. DevCraft banner
  4. Myles
    Myles avatar
    18 posts
    Member since:
    Mar 2012

    Posted 15 Mar 2012 Link to this post

    "RadScheduleView will resize ony the appointment that is being resized, even if you select multiple appointments" - Are there any plans to introduce this functionality in the future?  The lack of this functionality is preventing me from purchasing this product.
  5. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 20 Mar 2012 Link to this post

    Hi Myles,

    I have added this feature request in PITS. You can view it here. You can vote for it and track its status to see when it is going to be implemented. Once we start working on it, the status will be updated. The more vote it receives, the earlier will be implemented.

    Regards,
    Konstantina
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Back to Top