Rad Scheduler -how to set different appointment different height in timeline view control.

4 posts, 0 answers
  1. John
    John avatar
    19 posts
    Member since:
    May 2017

    Posted 17 May 2017 Link to this post

    Rad Scheduler - how to set different appointment different  height in timeline view control. and I am using two different scheduler element provider so,how to maintain every appointment with different height.And also any solution for day duration wise automatically appointment height set using winforms.
  2. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3327 posts

    Posted 17 May 2017 Link to this post

    Hello John, 

    Thank you for writing.  

    The AppointmentHeight property of SchedulerTimelineViewElement controls the appointment's height. RadScheduler is designed to have the identical height for its appointments in the timeline view. The layout is performed considering the AppointmentHeight because the elements are stacked when occupying the same time interval. However, you can handle the AppointmentFormatting event  and specify the minimum height of the AppointmentElement:
    public RadForm1()
    {
        InitializeComponent();
        this.radScheduler1.AppointmentFormatting += radScheduler1_AppointmentFormatting;
     
        for (int i = 0; i < 5; i++)
        {
            this.radScheduler1.Appointments.Add(new Appointment(DateTime.Now.AddDays(i),TimeSpan.FromMinutes(45),"Meeting" + i));
        }
        this.radScheduler1.ActiveViewType = SchedulerViewType.Timeline;
        SchedulerTimelineViewElement viewElement = this.radScheduler1.SchedulerElement.ViewElement as SchedulerTimelineViewElement;
        viewElement.AppointmentHeight = 40;
     
        this.radScheduler1.AutoSizeAppointments = true;
    }
     
    private void radScheduler1_AppointmentFormatting(object sender, SchedulerAppointmentEventArgs e)
    {
        if (e.Appointment.Summary.Contains("2"))
        {
            e.AppointmentElement.MinSize = new Size(0,100);
        }
    }

    I hope this information helps. Should you have further questions I would be glad to help.

    Regards,
    Dess
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. John
    John avatar
    19 posts
    Member since:
    May 2017

    Posted 17 May 2017 in reply to Dess | Tech Support Engineer, Sr. Link to this post

    Thanks Dess for giving reply

    I was write down code but not any effect and also i am saying every create appointment then height set run time differently like 
    create first appointment startdate 01-01-2017 to 01-31-2017 then set appointment height 100
    create second appointment startdate 01-01-2017 to 01-15-2017 then set appointment height 50
    create third appointment startdate 01-01-2017 to 01-5-2017 then set appointment height 28
    So, how to set every appointment with different height

    if this is not possible then Can you give code for using for each loop set unique height with appointment(Give Code)
    Please Dess possible to give fast reply

  4. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3327 posts

    Posted 18 May 2017 Link to this post

    Hello John, 

    Thank you for writing back. 

    As it was demonstrated in my previous post, it is necessary to use the AppointmentFormatting event and specify the AppointmentElement.MinSize property in order to apply the desired height. You have access to the Appointment in the event arguments, hence you can determine the height considering the appointment. 

    We kindly ask you to use just one thread for a specific problem to contact us. Posting the same questions numerous times slows down our response time because we will need to review and address two or more tickets instead of one. Thank you for your understanding.

    I hope this information helps.

    Regards,
    Dess
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top