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

Bold lines for hours in dayview and weekview

4 Answers 77 Views
Scheduler and Reminder
This is a migrated thread and some comments may be shown as answers.
Jan
Top achievements
Rank 1
Jan asked on 18 Nov 2020, 03:08 PM

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!

4 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 19 Nov 2020, 05:28 AM

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/.

0
Jan
Top achievements
Rank 1
answered on 19 Nov 2020, 07:05 AM

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

0
Accepted
Dess | Tech Support Engineer, Principal
Telerik team
answered on 20 Nov 2020, 12:21 PM

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/.

0
Jan
Top achievements
Rank 1
answered on 20 Nov 2020, 01:49 PM

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);
    }
}
Tags
Scheduler and Reminder
Asked by
Jan
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Jan
Top achievements
Rank 1
Share this question
or