IS the AjaxControlToolkit.CalendarExtender control bindable?
In my eWorld.CalendarPopup you use the database to set holidays, and there are numerous graphical properties. It seems to me that:
- the CalendarToolkit has no method to link itself to some database full of holidays
- the only way to format the look at feel of the calendar is via CSS.
(1) Are these assumptions correct? Is the CalendarExtender thus considered a limited control?
(2) I take care of styling in the Render event handler, as in:
writer.Write(@"<Style type='text/css'>
.ajax__calendar_container
{
padding: 0px 0px 0px 0px;
}
.ajax__calendar_header, .ajax__calendar_footer
{
font-size: " + (CalendarFontSize.IsEmpty ? "8pt" : CalendarFontSize.ToString()) + @";
font-family: " + (string.IsNullOrEmpty(CalendarFontName) ? "Verdana" : CalendarFontName) + @";
font-weight: bold;
background-color: #dcdcdc;
border-width: 0px;
}
//...
//...
</Style>"
);
base.Render(writer);
To answer your first question… the AjaxControlToolkit.CalendarExtender is not bindable, however, the control that it is extending can be. For example, if you add the AjaxControlToolkit.CalendarExtender to a TextBox control, you can bind the text box to a value in some database.
The AjaxControlToolkit.CalendarExtender only does what it was designed to do… extend existing controls by showing a calendar control where users can pick a date. However, it is not a calendar control…