Default duration of an appointment is 1440min(24hours) in month view definition! Why ?

3 posts, 0 answers
  1. Hiwa
    Hiwa avatar
    21 posts
    Member since:
    Mar 2013

    Posted 03 Jun 2013 Link to this post

    Hello ,
    When scheduling appointments, the length defaults to 440min(24hours) in month view definition
    How can I change the duration value?
    Thanks in advance
    hiwa
  2. Kalin
    Admin
    Kalin avatar
    1209 posts

    Posted 06 Jun 2013 Link to this post

    Hello Hiwa,

    In order to change the default hours in EditAppointmentDialog I would suggest that you use the AppointmentCreating event which is fired only when creating new Appointment. You should check the type of the ActiveViewDefinition in order to change it only in MonthViewDefinition.

     Please see the code snippet below:

    private void radScheduleView_AppointmentCreating(object sender, AppointmentCreatingEventArgs e)
            {
                if ((sender as RadScheduleView).ActiveViewDefinition is MonthViewDefinition)
                {
                    var app = e.Appointment as Appointment;
                    app.End = app.Start.AddHours(30);
                }
            }

    Hope this helps.

    Regards,
    Kalin
    Telerik

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. UI for WPF is Visual Studio 2017 Ready
  4. Hiwa
    Hiwa avatar
    21 posts
    Member since:
    Mar 2013

    Posted 06 Jun 2013 Link to this post

    Hi Kalin,
    Thank you so much for  your help.
    It works.
    hiwa
Back to Top