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

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

3 Answers 138 Views
Scheduler and Reminder
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 17 May 2017, 07:05 AM
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.

3 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 17 May 2017, 11:54 AM
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.
0
John
Top achievements
Rank 1
answered on 17 May 2017, 12:57 PM

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

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 18 May 2017, 07:49 AM
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.
Tags
Scheduler and Reminder
Asked by
John
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
John
Top achievements
Rank 1
Share this question
or