New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial

Collection containing dates of type RadDate. Used in Date Selection functionality

Definition

Constructors

DateTimeCollection constructor. Used in Date Selection functionality

C#
public DateTimeCollection()

DateTimeCollection constructor. Used in Date Selection functionality

C#
public DateTimeCollection(ArrayList dateList)
Parameters:dateListArrayList

Properties

Gets or sets the parent RadCalendar controls.

C#
public RadCalendar ParentCalendar { get; set; }
Property Value:

The parent RadCalendar controls.

Returns a DateTime object depending on the passed index. Only integer and string indexes are valid.

C#
public virtual RadDate this[object obj] { get; set; }
Parameters:objobject

Methods

Adds a DateTime object to the collection of CalendarDays.

C#
public virtual int Add(RadDate inputItem)
Parameters:inputItemRadDate

The RadDate object to add to the collection.

Returns:

int

Adds the elements of the specified collection to the end of the DateTimeCollection.

C#
public virtual void AddRange(RadDate[] inputItems)
Parameters:inputItemsRadDate[]

The collection whose RadDate elements should be added to the end of the DateTimeCollection.

Removes all DateTime objects in the collection of CalendarDays.

C#
public void Clear()

Clones the DateTimeCollection instance.

C#
public virtual DateTimeCollection Clone()
Returns:

DateTimeCollection

Clones the inner ArrayList collection.

C#
public virtual ArrayList CloneInner()
Returns:

ArrayList

Checks whether a specific DateTime object is in the collection of CalendarDays.

C#
public virtual bool Contains(RadDate inputItem)
Parameters:inputItemRadDate

The DateTime object to search.

Returns:

bool

True if the DateTime is found, false otherwise.

Copies all the elements of the current one-dimensional DateTimeCollection to the specified one-dimensional DateTimeCollection starting at the specified destination index. The index is specified as a 32-bit integer.

C#
public virtual void CopyTo(Array array, int index)
Parameters:arrayArray

The one-dimensional DateTimeCollection that is the destination of the elements copied from the current DateTimeCollection.

indexint

A 32-bit integer that represents the index in array at which copying begins.

Copies all DateTime elements of the DateTime Array to the specified one-dimensional DateTimeCollection starting at the specified destination index. The index is specified as a 32-bit integer.

C#
public virtual void CopyTo(DateTime[] inputArray, int startCopyIndex)
Parameters:inputArrayDateTime[]

The one-dimensional DateTimeCollection that is the destination of the elements copied from the current DateTimeCollection.

startCopyIndexint

A 32-bit integer that represents the index in array at which copying begins.

Copies all DateTime elements of the DateTime Array to the specified one-dimensional DateTimeCollection.

C#
public virtual void CopyTo(DateTime[] inputArray)
Parameters:inputArrayDateTime[]

The one-dimensional DateTimeCollection that is the destination of the elements copied from the current DateTimeCollection.

Returns a zero based index of a DateTime object depending on the passed index.

C#
[SuppressMessage("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
public virtual int IndexOf(object inputItem)
Parameters:inputItemobject

The zero-based index, DateTime object or the date represented by the searched DateTime object.

Returns:

int

A zero based index of the DateTime object in the collection, or -1 if the DateTime object is not found.

Adds a DateTime object in the collection at the specified index.

C#
public virtual void Insert(int insertIndex, RadDate inputItem)
Parameters:insertIndexint

The index after which the DateTime object is inserted.

inputItemRadDate

The DateTime object to insert.

Deletes a DateTime object from the collection.

C#
public virtual void Remove(RadDate inputItem)
Parameters:inputItemRadDate

The DateTime object to remove.

Deletes the DateTime object from the collection at the specified index.

C#
public void RemoveAt(int index)
Parameters:indexint

The index in collection at which the DateTime object will be deleted.

Removes a range of elements from the DateTimeCollection.

C#
public virtual void RemoveRange(int startIndex, int itemCount)
Parameters:startIndexint

The zero-based starting index of the range of elements to remove.

itemCountint

The number of elements to remove.

Reverses the order of the elements in the entire collection.

C#
public virtual void Reverse()
Exceptions: NotSupportedException

Please refer to Reverse() for details.

Selects a range of dates from start to end date.

C#
public void SelectRange(DateTime fromDate, DateTime toDate)
Parameters:fromDateDateTime

The From date.

toDateDateTime

The To date.

Sorts the elements in the entire DateTimeCollection using the IComparable implementation of each element.

C#
public virtual void Sort()
Exceptions: NotSupportedException

Please refer to Sort(IComparer) for details.

Sorts the elements in the entire DateTimeCollection using the specified IComparer interface.

C#
public virtual void Sort(IComparer itemComparer)
Parameters:itemComparerIComparer

The IComparer implementation to use when comparing elements.

-or-

A null reference to use the IComparable implementation of each element.

Exceptions: NotSupportedException

Please refer to Sort(IComparer) for details.

Sorts the elements in the specified range using the specified IComparer interface.

C#
public virtual void Sort(int startIndex, int itemCount, IComparer itemComparer)
Parameters:startIndexint

The zero-based starting index of the range of elements to sort.

itemCountint

The number of elements to sort.

itemComparerIComparer

The IComparer implementation to use when comparing elements.

-or-

A null reference to use the IComparable implementation of each element.

Exceptions: ArgumentException

startIndex and itemCount do not denote a valid range of elements in the DateTimeCollection.

ArgumentOutOfRangeException

startIndex is less than zero.

-or-

itemCount is less than zero.

NotSupportedException

Please refer to Sort(IComparer) for details.

Copies the elements of DateTimeCollection to a new Array of DateTime elements.

C#
public virtual DateTime[] ToArray()
Returns:

DateTime[]

A one-dimensional Array of DateTime elements containing copies of the elements of the DateTimeCollection.

Please refer to ToArray() for details.