Adding Controls to the Header Element in the Scheduler

2 posts, 0 answers
  1. Nechama
    Nechama avatar
    5 posts
    Member since:
    Feb 2019

    Posted 14 Jun 2019 Link to this post



    Is it possible to add a series of check boxes to each header? I would like them to appear directly underneath the date.



  2. Nadya
    Nadya avatar
    380 posts

    Posted 19 Jun 2019 Link to this post

    Hello, Nechama,

    According to the provided information, I suppose that you want to customize the default DayViewHeader element and add some check boxes underneath the date. The easiest way to achieve this is to use SchedulerElementProvider class which allows to replace the default RadScheduler element with custom ones. Please, refer to the following article for further information:

    You need to create SchedulerElementProvider descendant class and override the CreateElement method, as shown in the following code snippet:
    public Form1()
        this.radScheduler1.ElementProvider = new MyElementProvider(this.radScheduler1);
        SchedulerDayViewElement dayViewElement = (SchedulerDayViewElement)this.radScheduler1.ViewElement;
        dayViewElement.HeaderElement.HeaderHeight = 50;
    public class MyElementProvider : SchedulerElementProvider
        public MyElementProvider(RadScheduler scheduler)
            : base(scheduler)
        protected override T CreateElement<T>(SchedulerView view, object context)
            if (typeof(T) == typeof(SchedulerHeaderCellElement))
                return new CustomSchedulerHeaderCellElement(this.Scheduler, view) as T;
            return base.CreateElement<T>(view, context);

     After that you need to create your custom element which should be inherit of the SchedulerHeaderCellElement class and override some of its the default properties and methods. Indeed, you can create a stack layout element which will contains the date and the check boxes in itself. Please refer to the following code snippet which demonstrates how to achieve the illustrated result:

    public class CustomSchedulerHeaderCellElement : SchedulerHeaderCellElement
        public CustomSchedulerHeaderCellElement(RadScheduler scheduler, SchedulerView view) : base(scheduler, view)
        protected override Type ThemeEffectiveType
                return typeof(SchedulerHeaderCellElement);
        StackLayoutElement horizontalPanel = new StackLayoutElement();
        StackLayoutElement vertualPanel = new StackLayoutElement();
        LightVisualElement date = new LightVisualElement();
        RadCheckBoxElement checkBox1 = new RadCheckBoxElement();
        RadCheckBoxElement checkBox2 = new RadCheckBoxElement();
        RadCheckBoxElement checkBox3 = new RadCheckBoxElement();
        protected override void CreateChildElements()
            date.StretchHorizontally = true;
            vertualPanel.Orientation = Orientation.Vertical;
            vertualPanel.StretchHorizontally = true;
            horizontalPanel.Orientation = Orientation.Horizontal;
            horizontalPanel.StretchHorizontally = true;
            checkBox1.CheckStateChanged += CheckBox_CheckStateChanged;
            checkBox2.CheckStateChanged += CheckBox_CheckStateChanged;
            checkBox3.CheckStateChanged += CheckBox_CheckStateChanged;
            this.horizontalPanel.Visibility = Telerik.WinControls.ElementVisibility.Collapsed;
        private void CheckBox_CheckStateChanged(object sender, EventArgs e)
        public override string Text
            get { return base.Text; }
            set {
                base.Text = value;
       = value;
                this.DrawText = false;
                if (value == "Local" )
                    this.horizontalPanel.Visibility = Telerik.WinControls.ElementVisibility.Collapsed;
                    this.horizontalPanel.Visibility = Telerik.WinControls.ElementVisibility.Visible;
        protected override void InitializeFields()

    I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top