Class CalendarView
Summary description for CalendarView.
Inheritance
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
public abstract class CalendarView : INotifyPropertyChanged
Properties
AllowColumnHeaderSelectors
Gets or sets whether column headers ( if displayed by a MonthView object) will act as column selectors.
Declaration
public virtual bool AllowColumnHeaderSelectors { get; set; }
Property Value
|
System.Boolean
|
AllowFishEye
Gets or sets whether the fish eye functionality is enabled.
Declaration
public virtual bool AllowFishEye { get; set; }
Property Value
|
System.Boolean
|
AllowRowHeaderSelectors
Gets or sets whether row headers ( if displayed by a MonthView object) will act as row selectors.
Declaration
public virtual bool AllowRowHeaderSelectors { get; set; }
Property Value
|
System.Boolean
|
AllowViewSelector
Gets or sets whether a selector for the entire CalendarView ( MonthView ) will appear on the calendar.
Declaration
public virtual bool AllowViewSelector { get; set; }
Property Value
|
System.Boolean
|
Calendar
Gets the parent calendar that the current view is assigned to.
Declaration
public RadCalendar Calendar { get; }
Property Value
|
RadCalendar
|
CellHorizontalSpacing
Gets or sets the horizontal spacing between the calendar cells
Declaration
public int CellHorizontalSpacing { get; set; }
Property Value
|
System.Int32
|
CellMargin
Gets or sets the margin of the view cells
Declaration
public Padding CellMargin { get; set; }
Property Value
|
System.Windows.Forms.Padding
|
CellPadding
Gets or sets the margin of the view cells
Declaration
public Padding CellPadding { get; set; }
Property Value
|
System.Windows.Forms.Padding
|
CellToolTipFormat
Gets or sets the format string that is applied to the days cells tooltip.
Declaration
public string CellToolTipFormat { get; set; }
Property Value
|
System.String
|
Remarks
The property should contain either a format specifier character or a custom format pattern. For more information, see the summary page for System.Globalization.DateTimeFormatInfo.
By default this property uses formatting string of 'dddd, MMMM dd, yyyy'. Valid formats are all supported by the .NET Framework.
Example:
- "d" is the standard short date pattern.
- "%d" returns the day of the month; "%d" is a custom pattern.
- "d " returns the day of the month followed by a white-space character; "d " is a custom pattern.
CellVerticalSpacing
Gets or sets the vertical spacing between the calendar cells
Declaration
public int CellVerticalSpacing { get; set; }
Property Value
|
System.Int32
|
Children
Gets the collection of nodes that are assigned to the tree view control.
Declaration
public virtual CalendarViewCollection Children { get; }
Property Value
|
CalendarViewCollection
|
ColumnHeaderImage
Gets or sets the image displayed for the column header element.
Declaration
public Image ColumnHeaderImage { get; set; }
Property Value
|
System.Drawing.Image
The image displayed for the CalendarView column header element in the header cells. The default value is "". |
Remarks
This property applies only if the ShowColumnHeaders property is set to true. If ColumnHeaderText is set too, its value is set as an alternative text to the image of the column header.
When using this property, the whole image URL is generated using also the value.
Example:
ShowColumnHeaders="true"
ImagesBaseDir = "Img/"
ColumnHeaderImage = "selector.gif"
complete image URL : "Img/selector.gif"
ColumnHeaderText
Gets or sets the text displayed for the column header element.
Declaration
public string ColumnHeaderText { get; set; }
Property Value
|
System.String
The text displayed for the CalendarView column header element. The default value is "". |
Remarks
Use the ColumnHeaderText property to provide custom text for the CalendarView complete column header element.
![]() |
This property does not automatically encode to HTML. You need to convert special characters to the appropriate HTML value, unless you want the characters to be treated as HTML. For example, to explicitly display the greater than symbol (>), you must use the value >. |
Because this property does not automatically encode to HTML, it is possible to specify an HTML tag for the ColumnHeaderText property. For example, if you want to display an image for the next month navigation control, you can set this property to an expression that contains an <img> element.
This property applies only if the ShowColumnHeaders property is set to true.
Columns
Gets or sets the the count of columns to be displayed by a CalendarView.
Declaration
public int Columns { get; set; }
Property Value
|
System.Int32
|
CurrentCalendar
Gets the default System.Globalization.Calendar instance as specified by the default culture.
Declaration
public Calendar CurrentCalendar { get; }
Property Value
|
System.Globalization.Calendar
|
Remarks
A calendar divides time into measures, such as weeks, months, and years. The number, length, and start of the divisions vary in each calendar.
Any moment in time can be represented as a set of numeric values using a particular calendar. For example, the last vernal equinox occurred at (0.0, 0, 46, 8, 20, 3, 1999) in the Gregorian calendar. An implementation of Calendar can map any DateTime value to a similar set of numeric values, and DateTime can map such sets of numeric values to a textual representation using information from Calendar and DateTimeFormatInfo. The textual representation can be culture-sensitive (for example, "8:46 AM March 20th 1999 AD" for the en-US culture) or culture-insensitive (for example, "1999-03-20T08:46:00" in ISO 8601 format).
A Calendar implementation can define one or more eras. The Calendar class identifies the eras as enumerated integers where the current era (CurrentEra) has the value 0.
In order to make up for the difference between the calendar year and the actual time that the earth rotates around the sun or the actual time that the moon rotates around the earth, a leap year has a different number of days than a standard calendar year. Each Calendar implementation defines leap years differently.
For consistency, the first unit in each interval (for example, the first month) is assigned the value 1.
The System.Globalization namespace includes the following Calendar implementations: GregorianCalendar, HebrewCalendar, HijriCalendar, JapaneseCalendar, JulianCalendar, KoreanCalendar, TaiwanCalendar, and ThaiBuddhistCalendar.
HeaderHeight
The Height applied to a Header
Declaration
public virtual int HeaderHeight { get; set; }
Property Value
|
System.Int32
|
HeaderWidth
The Width applied to a Header
Declaration
public virtual int HeaderWidth { get; set; }
Property Value
|
System.Int32
|
IsMultipleView
Gets a value indicating whether the CalendarView has child views.
Declaration
public virtual bool IsMultipleView { get; }
Property Value
|
System.Boolean
|
IsRootView
Gets a value indicating whether the CalendarView is the top most view displayed by RadCalendar.
Declaration
public virtual bool IsRootView { get; }
Property Value
|
System.Boolean
|
Level
Gets the zero-based depth of the tree node in the RadTreeView tree. Returns -1 if the node is outside of a tree view.
Declaration
public int Level { get; }
Property Value
|
System.Int32
|
MonthLayout
Gets or sets the predefined pairs of rows and columns, so that the product of the two values is exactly 42, which guarantees valid calendar layout. It is applied on a single view level to every
Declaration
public virtual MonthLayout MonthLayout { get; set; }
Property Value
|
MonthLayout
|
MultiViewColumns
Gets or sets the the count of columns to be displayed by a multi month CalendarView.
Declaration
public int MultiViewColumns { get; set; }
Property Value
|
System.Int32
|
MultiViewRows
Gets or sets the the count of rows to be displayed by a multi month CalendarView.
Declaration
public int MultiViewRows { get; set; }
Property Value
|
System.Int32
|
Name
Gets or sets the name of the node.
Declaration
public virtual string Name { get; set; }
Property Value
|
System.String
|
NextView
Gets the next available view. Used for traversal of the calendar.
Declaration
public virtual CalendarView NextView { get; }
Property Value
|
CalendarView
|
Orientation
Gets or sets the orientation (rendering direction) of the calendar component. Default value is Horizontal.
Declaration
public Orientation Orientation { get; set; }
Property Value
|
System.Windows.Forms.Orientation
|
Remarks
| Member | Description |
|---|---|
| Horizontal | Renders the calendar data row after row. |
| Vertical | Renders the calendar data column after column. |
Parent
Gets the parent tree node of the current tree node.
Declaration
public virtual CalendarView Parent { get; }
Property Value
|
CalendarView
|
PreviousView
Gets the previous available view. Used for traversal of the calendar.
Declaration
public virtual CalendarView PreviousView { get; }
Property Value
|
CalendarView
|
ReadOnly
Gets or sets a value indicating whether the calendar view is in read-only mode.
Declaration
public virtual bool ReadOnly { get; set; }
Property Value
|
System.Boolean
|
RootView
Gets the root parent node for this instance.
Declaration
public CalendarView RootView { get; }
Property Value
|
CalendarView
|
RowHeaderImage
Gets or sets the image displayed for the row header element.
Declaration
public Image RowHeaderImage { get; set; }
Property Value
|
System.Drawing.Image
The image displayed for the CalendarView row header element. The default value is "". |
Remarks
This property applies only if the ShowRowHeaders property is set to true. If RowHeaderText is set too, its value is set as an alternative text to the image of the row header.
When using this property, the whole image URL is generated using also the value.
Example:
ShowRowHeaders = "true"
ImagesBaseDir = "Img/"
RowHeaderImage = "selector.gif"
complete image URL : "Img/selector.gif"
RowHeaderText
Gets or sets the text displayed for the row header element.
Declaration
public string RowHeaderText { get; set; }
Property Value
|
System.String
The text displayed for the CalendarView header element. The default value is "". |
Remarks
Use the RowHeaderText property to provide custom text for the CalendarView complete row header element.
![]() |
This property does not automatically encode to HTML. You need to convert special characters to the appropriate HTML value, unless you want the characters to be treated as HTML. For example, to explicitly display the greater than symbol (>), you must use the value >. |
Because this property does not automatically encode to HTML, it is possible to specify an HTML tag for the RowHeaderText property. For example, if you want to display an image for the next month navigation control, you can set this property to an expression that contains an <img> element.
This property applies only if the ShowRowsHeaders property is set to true.
Rows
Gets or sets the the count of rows to be displayed by a CalendarView.
Declaration
public int Rows { get; set; }
Property Value
|
System.Int32
|
ShowColumnHeaders
Gets or sets whether a CalendarView object will display a header row.
Declaration
public virtual bool ShowColumnHeaders { get; set; }
Property Value
|
System.Boolean
|
ShowHeader
Gets or sets whether a single CalendarView object will display a title row.
Declaration
public virtual bool ShowHeader { get; set; }
Property Value
|
System.Boolean
|
ShowOtherMonthsDays
Gets or sets whether the month matrix, when rendered will show days from other (previous or next) months or will render only blank cells.
Declaration
public virtual bool ShowOtherMonthsDays { get; set; }
Property Value
|
System.Boolean
|
ShowRowHeaders
Gets or sets whether a CalendarView object will display a header column.
Declaration
public virtual bool ShowRowHeaders { get; set; }
Property Value
|
System.Boolean
|
ShowSelector
Gets or sets whether a single CalendarView object will display a selector.
Declaration
public virtual bool ShowSelector { get; set; }
Property Value
|
System.Boolean
|
TitleAlign
Gets or sets the horizontal alignment of the view title.
The ContentAlignment enumeration is defined in System.Windows.Forms.VisualStyles
Declaration
public virtual ContentAlignment TitleAlign { get; set; }
Property Value
|
System.Windows.Forms.VisualStyles.ContentAlignment
|
Remarks
|
Member name |
Description |
|---|---|
|
Center | The contents of a container are centered. |
| Left | The contents of a container are left justified. |
| Right | The contents of a container are right justified. |
TitleFormat
Gets or sets the format string used to format the text inside the header row.
Declaration
public virtual string TitleFormat { get; set; }
Property Value
|
System.String
|
ViewEndDate
Gets or sets a DateTime value specifying the ending date for the period handled by a CalendarView instance.
Declaration
public virtual DateTime ViewEndDate { get; set; }
Property Value
|
System.DateTime
|
ViewRenderEndDate
Gets the DateTime object that is the last date to be rendered by CalendarView. While ViewEndDate is the start date that is handled by a particular CalendarView instance, the ViewRenderEndDate might belong to a different (next) CalendarView object.
Declaration
protected virtual DateTime ViewRenderEndDate { get; set; }
Property Value
|
System.DateTime
|
ViewRenderStartDate
Gets the DateTime object that is the first date to be rendered by CalendarView. While ViewStartDate is the start date that is handled by a particular CalendarView instance, the ViewRenderStartDate might belong to a different (previous) CalendarView object.
Declaration
protected virtual DateTime ViewRenderStartDate { get; set; }
Property Value
|
System.DateTime
|
ViewSelectorImage
Gets or sets the image displayed for the complete selection element in the view selector cell.
Declaration
public Image ViewSelectorImage { get; set; }
Property Value
|
System.Drawing.Image
The image displayed for the CalendarView selection element in the selector cell. The default value is "". |
Remarks
When using this property, the whole image URL is generated using also the value.
Example:
ImagesBaseDir = "Img/"
ViewSelectorImage = "selector.gif"
complete image URL : "Img/selector.gif"
ViewSelectorText
Gets or sets the text displayed for the complete CalendarView selection element in the view selector cell.
Declaration
public string ViewSelectorText { get; set; }
Property Value
|
System.String
The text displayed for the CalendarView selection element in the selector cell. The default value is "". |
Remarks
Use the ViewSelectorText property to provide custom text for the CalendarView complete selection element in the selector cell.
|
This property does not automatically encode to HTML. You need to convert special characters to the appropriate HTML value, unless you want the characters to be treated as HTML. For example, to explicitly display the greater than symbol (>), you must use the value >. |
Because this property does not automatically encode to HTML, it is possible to specify an HTML tag for the ViewSelectorText property. For example, if you want to display an image for the next month navigation control, you can set this property to an expression that contains an <img> element.
This property applies only if the EnableViewSelector property is set to true.
ViewStartDate
Gets or sets a DateTime value specifying the starting date for the period handled by a CalendarView instance.
Declaration
public virtual DateTime ViewStartDate { get; set; }
Property Value
|
System.DateTime
|
Visible
Gets or sets a value indicating whether the tree node is visible or partially visible.
Declaration
public bool Visible { get; set; }
Property Value
|
System.Boolean
|
ZoomFactor
Gets or sets the zooming factor of a cell which is handled by the fish eye functionality.
Declaration
public virtual float ZoomFactor { get; set; }
Property Value
|
System.Single
|
Methods
AddViewPeriods(DateTime, Int32)
Declaration
protected virtual DateTime AddViewPeriods(DateTime startDate, int periods)
Parameters
|
System.DateTime
startDate
|
|
System.Int32
periods
|
Returns
|
System.DateTime
|
CreateView()
CreateView(DateTime)
Creates a CalendarView object based on the logic implemented by the CalendarView instance that implements the method.
Declaration
protected virtual CalendarView CreateView(DateTime date)
Parameters
|
System.DateTime
date
DateTime object that is used to create the CalendarView. |
Returns
|
CalendarView
The created CalendarView object. |
Dispose()
Declaration
public void Dispose()
EffectiveVisibleDate()
Returns the DateTime object that is used by the CalendarView to initialize.
Declaration
protected virtual DateTime EffectiveVisibleDate()
Returns
|
System.DateTime
DateTime object that is used by the CalendarView to initialize. |
EnsureChildViews()
Ensures that the child views collection is created.
Declaration
protected virtual void EnsureChildViews()
EnsureRenderSettings()
Verifies CalendarView settings required for correct presentation of calendrical information.
Declaration
protected virtual void EnsureRenderSettings()
GetNextViewDate()
Gets a DateTime object that is part of the date range handled by the next calendar view. Used for traversal of the calendar.
Declaration
protected virtual DateTime GetNextViewDate()
Returns
|
System.DateTime
The DateTime object |
GetPreviousViewDate()
Gets a DateTime object that is part of the date range handled by the previous calendar view. Used for traversal of the calendar.
Declaration
protected virtual DateTime GetPreviousViewDate()
Returns
|
System.DateTime
The DateTime object |
HandleDownKey(Keys)
handles the down arrow key.
Declaration
protected virtual void HandleDownKey(Keys keys)
Parameters
|
System.Windows.Forms.Keys
keys
The key data to be processed. |
HandleEndKey(Keys)
handles the End key.
Declaration
protected virtual void HandleEndKey(Keys keys)
Parameters
|
System.Windows.Forms.Keys
keys
The key data to be processed. |
HandleHomeKey(Keys)
handles the Home key.
Declaration
protected virtual void HandleHomeKey(Keys keys)
Parameters
|
System.Windows.Forms.Keys
keys
The key data to be processed. |
HandleKeyDown(Keys)
handles key events that require processing from CalendarView.
Declaration
protected virtual bool HandleKeyDown(Keys keys)
Parameters
|
System.Windows.Forms.Keys
keys
The key data to be processed. |
Returns
|
System.Boolean
|
HandleLeftKey(Keys)
handles the left arrow key.
Declaration
protected virtual void HandleLeftKey(Keys keys)
Parameters
|
System.Windows.Forms.Keys
keys
The key data to be processed. |
HandlePageDownKey(Keys)
handles the page down key.
Declaration
protected virtual void HandlePageDownKey(Keys keys)
Parameters
|
System.Windows.Forms.Keys
keys
The key data to be processed. |
HandlePageUpKey(Keys)
handles the page up key.
Declaration
protected virtual void HandlePageUpKey(Keys keys)
Parameters
|
System.Windows.Forms.Keys
keys
The key data to be processed. |
HandleRightKey(Keys)
handles the right arrow key.
Declaration
protected virtual void HandleRightKey(Keys keys)
Parameters
|
System.Windows.Forms.Keys
keys
The key data to be processed. |
HandleUpKey(Keys)
handles the up arrow key.
Declaration
protected virtual void HandleUpKey(Keys keys)
Parameters
|
System.Windows.Forms.Keys
keys
The key data to be processed. |
IsDateInView(DateTime)
Determines if a DateTime object belongs to the dates range managed by a particular CalendarView.
Declaration
public bool IsDateInView(DateTime date)
Parameters
|
System.DateTime
date
The DateTime object to be tested. |
Returns
|
System.Boolean
True if the DateTime object belongs to the dates range managed by a particular CalendarView; False otherwise. |
OnNotifyPropertyChanged(PropertyChangedEventArgs)
Declaration
protected virtual void OnNotifyPropertyChanged(PropertyChangedEventArgs e)
Parameters
|
System.ComponentModel.PropertyChangedEventArgs
e
|
OnNotifyPropertyChanged(String)
Raises the PropertyChanged event
Declaration
protected virtual void OnNotifyPropertyChanged(string propertyName)
Parameters
|
System.String
propertyName
The name of the property |
Select(DateTime)
Adds the specified date to the SelectedDates collection of RadCalendar.
Declaration
public virtual void Select(DateTime date)
Parameters
|
System.DateTime
date
The DateTime object to add. |
SelectRange(DateTime, DateTime)
Adds the specified range of dates to the SelectedDates collection of RadCalendar.
Declaration
public virtual void SelectRange(DateTime startDate, DateTime endDate)
Parameters
|
System.DateTime
startDate
A System.DateTime that specifies the initial date to add to the SelectedDates collection. |
|
System.DateTime
endDate
A System.DateTime that specifies the end date to add to the SelectedDates collection. |
SelectRange(DateTime[])
Adds the specified range of dates to the SelectedDates collection of RadCalendar.
Declaration
public virtual void SelectRange(DateTime[] dates)
Parameters
|
System.DateTime[]
dates
array of DateTime objects to add. |
SetDateRange()
Initializes properly the ViewStartDate, ViewEndDate, ViewRenderStartDate, ViewRenderEndDate properties
Declaration
protected virtual void SetDateRange()
ToggleSelection(Keys)
Toogles the date selection (Enter key).
Declaration
protected virtual void ToggleSelection(Keys keys)
Parameters
|
System.Windows.Forms.Keys
keys
The key data to be processed. |
Events
PropertyChanged
Occurs when when a property of an object changes change. Calling the event is developer's responsibility.
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
|
System.ComponentModel.PropertyChangedEventHandler
|
