3 Answers, 1 is accepted
0
Hello Veshala,
Thank you for writing. Here is a sample code which demonstrates how to modify the Font property of RadCalendar cells:
RadCalendarElement calendarElement = this.radCalendar1.CalendarElement;
MonthViewElement monthViewElement = (MonthViewElement)calendarElement.CalendarVisualElement;
CalendarTableElement table =monthViewElement.TableElement;
foreach(CalendarCellElement cell in table.Children )
{
cell.Font = new Font(cell.Font, FontStyle.Bold);
}
You can also modify any other properties of CalendarCellElement such as BackColor, ForeColor. You can also find the cell position in the calendar table using the Row and Column properties.
To check whether a specific cell is a header cell i.e a cell from the Row header or Column header you can do the following:
bool isHeaderCell = (bool)cell.GetValue(CalendarCellElement.IsHeaderCellProperty);
Please write me back if you need more information.
Best wishes,
Boyko Markov
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Thank you for writing. Here is a sample code which demonstrates how to modify the Font property of RadCalendar cells:
RadCalendarElement calendarElement = this.radCalendar1.CalendarElement;
MonthViewElement monthViewElement = (MonthViewElement)calendarElement.CalendarVisualElement;
CalendarTableElement table =monthViewElement.TableElement;
foreach(CalendarCellElement cell in table.Children )
{
cell.Font = new Font(cell.Font, FontStyle.Bold);
}
You can also modify any other properties of CalendarCellElement such as BackColor, ForeColor. You can also find the cell position in the calendar table using the Row and Column properties.
To check whether a specific cell is a header cell i.e a cell from the Row header or Column header you can do the following:
bool isHeaderCell = (bool)cell.GetValue(CalendarCellElement.IsHeaderCellProperty);
Please write me back if you need more information.
Best wishes,
Boyko Markov
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Mike
Top achievements
Rank 1
answered on 22 Jul 2015, 08:38 PM
i've tried this, and am using the zoom header navigation mode... whenever i use the zoom navigation i lose the font settings for the calendar items, is there an event i need to refresh the font settings on, or could there be a global way of overriding the font so i dont have to set it for every single cell?
also is there any way to make the fastforward, fastreverse, next and previous arrows larger on the calendar header?
0
Hello Mike,
Thank you for writing.
In order to change the font of RadCalendar cell elements it is appropriate to use the RadCalendar.ElementRender event:
As to the question about customizing the header elements, you can access each item from the CalendarElement.CalendarNavigationElement and specifies the desired MinSize:
I hope this information helps. Should you have further questions, I would be glad to help.
Regards,
Dess
Telerik
Thank you for writing.
In order to change the font of RadCalendar cell elements it is appropriate to use the RadCalendar.ElementRender event:
Font f =
new
Font(
"Arial"
, 12f, FontStyle.Bold);
private
void
radCalendar1_ElementRender(
object
sender, Telerik.WinControls.UI.RenderElementEventArgs e)
{
e.Element.Font = f;
}
As to the question about customizing the header elements, you can access each item from the CalendarElement.CalendarNavigationElement and specifies the desired MinSize:
this
.radCalendar1.CalendarElement.CalendarNavigationElement.NextButton.MinSize =
new
Size(50, 30);
I hope this information helps. Should you have further questions, I would be glad to help.
Dess
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items