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

Rad Scheduler - how to set only current appointment height and width and all other appointment height and width as it is ?

2 Answers 184 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 22 May 2017, 10:22 AM

I was not able to set custom appointment height and width at runtime So, I was used TimelineAppointmentsPresenter class and ResolveOverlappingAppointments method using possible to display manually height and width at runtime.But I was faced one problem our appointment data is 10,00,000 When I was  create new appointment and set only new appointment height and width set. then all other appointment height and width default set(Not  Consider when previously set).So,every time set all appointment height and width.So,how to set only current appointment height and width and all other appointment  are as it is ?

Because it's decrease performance.

----Code

 Protected Overrides Sub ResolveOverlappingAppointments(availableSize As SizeF)
        
Dim arrangedAppointments As New List(Of AppointmentElement)()
  
        AppointmentElements.AsEnumerable().Where(Function(e) e.Visibility <> ElementVisibility.Collapsed).
            All(Function(o)
                  
    End Sub

End Class

2 Answers, 1 is accepted

Sort by
0
John
Top achievements
Rank 1
answered on 22 May 2017, 10:26 AM

Other Wise any easy way to give for fast performance and set manually height and width. Please inform to me.it's urgently,Possible to give fast reply

 

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 23 May 2017, 09:01 AM
Hello John, 

Thank you for writing.  
 
By design, RadScheduler's appointments are sized according to the time slot they take. In timeline/month view, for example, the AppointmentHeight property is purposed to control the height. It is not expected to have appointments with different height and width. However, you can handle the AppointmentFormatting event and specify the height. As to the width, it depends on the width of the column to which the appointment belong:
public RadForm1()
{
    InitializeComponent();
 
    this.radScheduler1.ActiveViewType = Telerik.WinControls.UI.SchedulerViewType.Timeline;
    this.radScheduler1.AutoSizeAppointments = true;
 
    this.radScheduler1.AppointmentFormatting+=radScheduler1_AppointmentFormatting;
    for (int i = 0; i < 10; i++)
    {
        this.radScheduler1.Appointments.Add(new Appointment(DateTime.Now.AddDays(i),TimeSpan.FromDays(1),"Event" + i));
    }
 
}
 
private void radScheduler1_AppointmentFormatting(object sender, SchedulerAppointmentEventArgs e)
{
    if (e.Appointment.Summary.Contains("3"))
    {
         e.AppointmentElement.MinSize = new Size(0,100);
    }
}

I would like to note that threads are handled according to license and time of posting, so if it is an urgent problem, we suggest you use a support ticket, which would be handled by a forum thread.
 
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.
Tags
Scheduler and Reminder
Asked by
John
Top achievements
Rank 1
Answers by
John
Top achievements
Rank 1
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or