Class DateSelections
Holds a collection of DateTime objects.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.Windows.Forms.Schedule
Assembly: Syncfusion.Schedule.Windows.dll
Syntax
public class DateSelections : ArrayList, IList, ICollection, IEnumerable, ICloneable
Remarks
This class hold the dates that are the currently selected dates for the ScheduleControl. As your user clicks and drags in the NavigationControl panel, an instance of this class holds the currently selected dates.
Constructors
DateSelections()
Initializes a new instance of the DateSelections class.
Declaration
public DateSelections()
Properties
Item[Int32]
Gets or sets the DateTime value at position i in this collection.
Declaration
public DateTime this[int i] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | i | The position used to retrieve the desired DateTime value. |
Property Value
Type |
---|
System.DateTime |
Methods
Add(Object)
Adds an object to the collection conditionally.
Declaration
public void Add(object t)
Parameters
Type | Name | Description |
---|---|---|
System.Object | t | The object to be added. |
Remarks
This collection will only hold unique occurrences of each date. This Add method hides the ArrayList.Add method to make sure no duplicates are added. It also raises the SelectionsChanged event.
AddRange(ICollection)
Adds a collection of objects to this collection.
Declaration
public void AddRange(ICollection timeArray)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.ICollection | timeArray | The collection to be added. |
Remarks
This method raises the SelectionsChanged event.
BeginUpdate()
Suspends the collection from raising the SelectionsChanged event.
Declaration
public void BeginUpdate()
Remarks
You can call this method before making a series of additions/removals from this collection. This will prevent any listener to SelectionsChanged from seeing these changes. You can then use EndUpdate to resume the SelectionsChanged event being raised.
Clear()
Clears this collection.
Declaration
public void Clear()
Remarks
This method raises the SelectionsChanged event.
EndUpdate()
Resumes the raising of the SelectionsChanged event.
Declaration
public void EndUpdate()
EndUpdate(Boolean)
Resumes the raising of the SelectionsChanged event.
Declaration
public void EndUpdate(bool ignoreSelectionsChanged)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | ignoreSelectionsChanged | False if you want the SelectionsChanged event to be raised to alert event listeners to the current state of the collection. |
OnSelectionsChanged()
Raises the SelectionsChanged event.
Declaration
public virtual void OnSelectionsChanged()
Remove(DateTime)
Removes a DateTime from this collection.
Declaration
public void Remove(DateTime dt)
Parameters
Type | Name | Description |
---|---|---|
System.DateTime | dt | The date to be removed. |
Remarks
This method raises the SelectionsChanged event.
RemoveAt(Int32)
Removes a item from this collection at the index passed inAddControlToNavigationPanel.
Declaration
public void RemoveAt(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index of the item to be removed. |
Remarks
This method raises the SelectionsChanged event.
RemoveRange(Int32, Int32)
Removes a range of items from this collection.
Declaration
public void RemoveRange(int index, int count)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index of the first item to be removed. |
System.Int32 | count | The number of items to be removed. |
Remarks
This method raises the SelectionsChanged event.
Events
SelectionsChanged
Occurs when items in the collection are added or removed.
Declaration
public event SelectionsChangedEventHandler SelectionsChanged
Event Type
Type |
---|
SelectionsChangedEventHandler |