Double click goes to URL

4 posts, 0 answers
  1. Farhad
    Farhad avatar
    3 posts
    Member since:
    Jul 2014

    Posted 21 Jul 2014 Link to this post

    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
  2. Rosen
    Admin
    Rosen avatar
    3234 posts

    Posted 23 Jul 2014 Link to this post

    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.

     
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Farhad
    Farhad avatar
    3 posts
    Member since:
    Jul 2014

    Posted 23 Jul 2014 Link to this post

    Hi Rosen,
    Thank you for the work around. I will try this method and post back if I have any issues.
  5. Farhad
    Farhad avatar
    3 posts
    Member since:
    Jul 2014

    Posted 23 Jul 2014 Link to this post

    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.
Back to Top
UI for ASP.NET MVC is VS 2017 Ready