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

Open Add / Edit event on a new page not in pop-up

1 Answer 155 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Jakub
Top achievements
Rank 2
Jakub asked on 16 Apr 2014, 11:21 PM
Hello,

is it possible to open the add/edit event view on a new page? We would like to avoid pop-ups in our application to prevent any user errors.

Thank you,

Jakub

1 Answer, 1 is accepted

Sort by
0
Accepted
Vladimir Iliev
Telerik team
answered on 18 Apr 2014, 01:22 PM
Hi Jakub,

You can set the "editable" option of the scheduler to false and attach custom "dblclick" event handler to the scheduler element which to navigate to another page and pass the event ID as URL parameter:

e.g.:
@(Html.Kendo().Scheduler<SchedulerCustomEditor.Models.MeetingViewModel>()
    .Name("scheduler")
    .Editable(false)

$(function () {
    var scheduler = $("#scheduler").data("kendoScheduler");
    scheduler.element.on("dblclick", ".k-event", function (e) {
        var uid = $(this).closest(".k-event").attr(kendo.attr("uid"));
        var event = scheduler.dataSource.getByUid(uid);
        window.location.href = '/Home/Meetings_Update/' + event.MeetingID;
    });
})

Kind Regards,
Vladimir Iliev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Scheduler
Asked by
Jakub
Top achievements
Rank 2
Answers by
Vladimir Iliev
Telerik team
Share this question
or