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

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

    Posted 22 May 2017 Link to this post

    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. John
    John avatar
    19 posts
    Member since:
    May 2017

    Posted 22 May 2017 in reply to John Link to this post

    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

     

  3. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3047 posts

    Posted 23 May 2017 Link to this post

    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.
Back to Top