DateTimeComparer
Compares appointment elements by start time, or by end time when compareByEndValue is enabled. The constructors select ascending or descending order, and a supplied scheduler can provide tie-breaking.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.Scheduler.dll
Syntax:
public class DateTimeComparer
Inheritance: objectDateTimeComparer
Constructors
Initializes a new instance of the DateTimeComparer class.
Initializes a comparer associated with the specified scheduler and sort direction.
public DateTimeComparer(RadScheduler scheduler, bool descending)
The scheduler whose optional appointment comparer can break ties.
descendingbooltrue to reverse the comparison order; otherwise, use ascending order.
Initializes an ascending start-time comparer associated with the specified scheduler.
public DateTimeComparer(RadScheduler scheduler)
The scheduler whose optional appointment comparer can break ties.
Fields
Specifies whether comparisons use appointment end times instead of start times.
public bool compareByEndValue
Methods
Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.
public int Compare(AppointmentElement x, AppointmentElement y)
The first object to compare.
yAppointmentElementThe second object to compare.
Returns:Value Condition Less than zerox is less than y.Zerox equals y.Greater than zerox is greater than y.