This is a migrated thread and some comments may be shown as answers.

Resize behavior cursor

5 Answers 233 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Christie Admin
Top achievements
Rank 1
Christie Admin asked on 28 Apr 2014, 07:46 PM
Hi,

I would like to know if it's possible to change the cursor in the resize process when we try to resize an appointment over a slot that I don't want to permit. A cursor like we have when we block the drop operation.

Also, I would like to know if it's possible to resize of an readonly slot depending on a specific scenario?

Thank's
Alain

5 Answers, 1 is accepted

Sort by
0
Rosi
Telerik team
answered on 29 Apr 2014, 01:10 PM
Hi,

Yes,you can implement custom ScheduleViewDragDropBehavior class as it is shown here  and here to change the logic for drag and resize.

By overriding  the CanResize method you can  forbid the resize over slots(return false) and the cursor will be changed.


Regards,
Rosi
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Christie Admin
Top achievements
Rank 1
answered on 29 Apr 2014, 01:47 PM
Hi Rosi,

by returning false, the cursor remain a resize cursor but of course, the appointment does not resize but the cursor still a resize cursor. Here is the logic I implemented. To try what you told me, I replace all my logic by the following line "return false;" but the problem remain the same.

        public override bool CanResize(DragDropState state)
        {
            bool canResize = true;

            if (this.OnCanResize != null)
            {
                
                ScheduleViewByWeekCanResizeArgs args = new ScheduleViewByWeekCanResizeArgs();

                args.CanResizeAgendaSpot.SourceMeetingId = (Guid)(state.Appointment as AppointmentSpot).MeetingId;
                args.CanResizeAgendaSpot.DestinationSpotStart = state.Appointment.Start;
                args.CanResizeAgendaSpot.DestinationSpotEnd = state.Appointment.End;

                this.OnCanResize(this, args);

                canResize = args.CanResizeAgendaSpot.IsCompatible;
            }

            if (canResize)
            {
                return base.CanResize(state);
            }
            else
            {
                return false;
            }
        }

Thank's
Alain
0
Rosi
Telerik team
answered on 29 Apr 2014, 01:58 PM
Hi,

I am sorry that I mislead you. What I suggested you will be true for drag operations only(if you override the CanDrop method instead CanResize). For resizing the "resize" cursor is hardcoded in RadScheduleView's code and cannot be overriden. I suggest you add this feature request to our Feedback portal. and once again apologize for the misunderstanding.

Regards,
Rosi
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Scott
Top achievements
Rank 1
answered on 29 Jan 2015, 03:26 PM
Was this feature ever implemented?  I overrode the CanStartResize method in ScheduleViewDragDropBehavior to disable resizing of appointments, which works fine.  However the resize cursor still appears when you hover near the edge of an appointment, which is is misleading and confusing to the user.  Is there a way to omit this cursor change yet?
0
Scott
Top achievements
Rank 1
answered on 29 Jan 2015, 04:33 PM
Please disregard this question.  I found the answer in this post:
http://www.telerik.com/forums/clumsy-grabbing-of-thin-appointments-due-to-resize-arrow-on-hover-d94a6121bf8d
Tags
ScheduleView
Asked by
Christie Admin
Top achievements
Rank 1
Answers by
Rosi
Telerik team
Christie Admin
Top achievements
Rank 1
Scott
Top achievements
Rank 1
Share this question
or