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

Double click goes to URL

3 Answers 141 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Farhad
Top achievements
Rank 1
Farhad asked on 21 Jul 2014, 11:48 AM
Hi I am hoping you can help me,
I would like to be able to double click on an existing event in the scheduler but instead of editing the event information in the edit template, I would like to be redirected to the specific Event's detail/edit page where via its url.

What would be the best way of achieving this?

Using: MVC5

Thanks

3 Answers, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 23 Jul 2014, 07:05 AM
Hello Farhad,

The easiest way to achieve such functionality is by using the edit event to navigate to the other page. For example:

@(Html.Kendo().Scheduler<ViewModel>()
    .Name("scheduler")  
    .Events(events => events.Edit("scheduler_edit"))
    .DataSource(d => d
             /*..*/
    )
   /*..*/
)
 
<script type="text/javascript">
 
    function scheduler_edit(e) {
        e.preventDefault();
        var url;
        if (e.event.isNew()) {
            url = '@Url.Action("Add", "Scheduler")';
        } else {
            url = '@Url.Action("Edit", "Scheduler")' + "/" + e.event.id;
        }
        location.href = url;
    }
 
</script>


Regards,
Rosen
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Farhad
Top achievements
Rank 1
answered on 23 Jul 2014, 07:16 AM
Hi Rosen,
Thank you for the work around. I will try this method and post back if I have any issues.
0
Farhad
Top achievements
Rank 1
answered on 23 Jul 2014, 07:17 AM
Hi Rosen,
Thank you for the work around.
I will post back if I have any issues with it.

P.S -  I keep getting redirected to a 500 page while trying to post this reply.
Tags
Scheduler
Asked by
Farhad
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Farhad
Top achievements
Rank 1
Share this question
or