Completed
Last Updated: 05 Jun 2018 08:20 by Dimitar
ADMIN
Hristo
Created on: 14 May 2018 07:51
Category: Calendar
Type: Bug Report
0
FIX. RadCalendar - the row headers border is still visible if the ShowOtherMonthsDays property is set to false in the VisualStudio2012LightTheme
How to reproduce:
public partial class RadForm1 : Telerik.WinControls.UI.RadForm
{
    public RadForm1()
    {
        InitializeComponent();


        ThemeResolutionService.ApplicationThemeName = "VisualStudio2012Light";

        this.radCalendar1.ShowRowHeaders = true;
        this.radCalendar1.AllowMultipleView = true;
        this.radCalendar1.MultiViewRows = 2;
        this.radCalendar1.MultiViewColumns = 2;
        this.radCalendar1.ShowFooter = true;
        this.radCalendar1.ShowOtherMonthsDays = false;
    }
}

Workaround: 
protected override void OnLoad(EventArgs e)
{
    base.OnLoad(e);

    MultiMonthViewElement viewElement = this.radCalendar1.CalendarElement.CalendarVisualElement as MultiMonthViewElement;
    CalendarMultiMonthViewTableElement tableElement = viewElement.FindDescendant<CalendarMultiMonthViewTableElement>() as CalendarMultiMonthViewTableElement;
    if (tableElement == null)
    {
        return;
    }

    foreach (RadElement child in tableElement.Children)
    {
        MonthViewElement monthViewElement = child as MonthViewElement;
        if (monthViewElement == null)
        {
            continue;
        }


        monthViewElement.FindDescendant<CalendarCellElement>().DrawBorder = false;
    }
}
0 comments