Bold lines for hours in dayview and weekview

5 posts, 1 answers
  1. Jan
    Jan avatar
    53 posts
    Member since:
    Oct 2007

    Posted 18 Nov 2020 Link to this post

    Hello,

    I have searched but not found any solution to somehow make the horizontal line for the full hour in scheduler.
    Please see the attached image. I'm struggling to put words on this ;)

    Any help or suggestions are appreciated.

    Thank you!

  2. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    4130 posts

    Posted 18 Nov 2020 Link to this post

    Hello, Jan,

    It seems that you missed to provide the attached image. Could you please try attaching it again to this thread? Thus, we would get better understanding of the precise case and provide further assistance. Thank you in advance.

    I am looking forward to your reply.

    Regards,
    Dess | Tech Support Engineer, Sr.
    Progress Telerik

    Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

  3. Jan
    Jan avatar
    53 posts
    Member since:
    Oct 2007

    Posted 19 Nov 2020 in reply to Dess | Tech Support Engineer, Sr. Link to this post

    Ah sorry! A bit embarrassing but I'm having trouble attaching a .jpg
    I hope it works now...

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

    Posted 20 Nov 2020 Link to this post

    Hello, Jan,    

    RadScheduler allows you to customize the cell elements by using the CellFormatting event. Thus, you can apply top border to the cells considering the associate time it represents:

            private void radScheduler1_CellFormatting(object sender, SchedulerCellEventArgs e)
            {
                if (e.CellElement.Date.Minute == 0)
                {
                    e.CellElement.BorderBoxStyle = BorderBoxStyle.FourBorders;
                    e.CellElement.BorderTopWidth = 5;
                }
                else
                {
                    e.CellElement.ResetValue(LightVisualElement.BorderBoxStyleProperty, ValueResetFlags.Local);
                    e.CellElement.ResetValue(LightVisualElement.BorderTopWidthProperty, ValueResetFlags.Local);
                }
            }

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

    Regards,
    Dess | Tech Support Engineer, Sr.
    Progress Telerik

    Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

  5. Jan
    Jan avatar
    53 posts
    Member since:
    Oct 2007

    Posted 20 Nov 2020 in reply to Dess | Tech Support Engineer, Sr. Link to this post

    Hi Dess,

    Thank you very much! Exactly what I was looking for.
    I did a minor adjustment (se below) and now it looks like I wanted.

    Cheers
    Jan

     

     

     

    private void radScheduler1_CellFormatting(object sender, SchedulerCellEventArgs e)
    {
        if (e.CellElement.Date.Minute == 0)
        {
            e.CellElement.BorderBoxStyle = BorderBoxStyle.FourBorders;
            e.CellElement.BorderTopWidth = 5;
            e.CellElement.BorderRightWidth = 1;
            e.CellElement.BorderLeftWidth = 1;
        }
        else
        {
            e.CellElement.ResetValue(LightVisualElement.BorderBoxStyleProperty, ValueResetFlags.Local);
            e.CellElement.ResetValue(LightVisualElement.BorderTopWidthProperty, ValueResetFlags.Local);
        }
    }
Back to Top