Prevent resizing & moving events

3 posts, 0 answers
  1. Kenny
    Kenny avatar
    11 posts
    Member since:
    Apr 2014

    Posted 18 Feb 2015 Link to this post

    Hi,

    I've seen the restrictions demo where you can catch the resize, resizeStart, resizeEnd, move, moveStart and moveEnd events:
    http://demos.telerik.com/kendo-ui/scheduler/restriction

    However I'm looking for a solution which would entirely remove the resize and move features.
    Could anyone point me in the right direction?

    Thanks in advance.

    Kind regards,
    Kenny.
  2. Kenny
    Kenny avatar
    11 posts
    Member since:
    Apr 2014

    Posted 18 Feb 2015 Link to this post

    At the moment I have this solution, but the small resize icons are sitll being shown. How can I get rid of those?
    Or in case there exists a better solution to prevent such behavior I'm happy to hear it.

    .Events(events => events.Resize("scheduler_OnResize"))
                    .Events(events => events.ResizeStart("scheduler_OnResizeStart"))
                    .Events(events => events.ResizeEnd("scheduler_OnResizeEnd"))
                    .Events(events => events.Move("scheduler_OnMove"))
                    .Events(events => events.MoveStart("scheduler_OnMoveStart"))
                    .Events(events => events.MoveEnd("scheduler_OnMoveEnd"))

    function scheduler_OnResize(e) {
            e.preventDefault();
        }

        function scheduler_OnResizeStart(e) {
            e.preventDefault();
        }

        function scheduler_OnResizeEnd(e) {
            e.preventDefault();
        }

        function scheduler_OnMove(e) {
            e.preventDefault();
        }

        function scheduler_OnMoveStart(e) {
            e.preventDefault();
        }

        function scheduler_OnMoveEnd(e) {
            e.preventDefault();
        }
  3. Kenny
    Kenny avatar
    11 posts
    Member since:
    Apr 2014

    Posted 18 Feb 2015 Link to this post

    Found the solution myself:

    .Editable(x => x
                        .TemplateId("customEditorTemplate")
                        .Resize(false)
                        .Move(false)
                        .Destroy(false))

    First I did what I put in the above post together with the following CSS to hide the resize buttons, but now its cleaner.

    k-event:hover .k-resize-handle, .k-event-active .k-resize-handle, .k-scheduler-mobile .k-event-active:hover .k-resize-handle { /* Hides the resize icons on events */
            visibility: hidden;
        }






Back to Top