ClassSchedulerBindingDataSource.EventBindingProvider
Provides binding functionality for scheduler events, handling data mapping between data source items and scheduler events.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.Scheduler.dll
Syntax:
public class SchedulerBindingDataSource.EventBindingProvider : BindingProviderBase<IEvent>, IComponent, IDisposable, IBindingListView, IBindingList, IList, ICollection, IEnumerable, ITypedList, ICancelAddNew, ISupportInitializeNotification, ISupportInitialize, ICurrencyManagerProvider, ISchedulerProvider<IEvent>
Inheritance: objectMarshalByRefObjectComponentBindingSourceBindingProviderBase<IEvent>SchedulerBindingDataSource.EventBindingProvider
Implements:
Inherited Members
Constructors
EventBindingProvider(SchedulerBindingDataSource)
Initializes a new instance of the SchedulerBindingDataSource.EventBindingProvider class.
Declaration
public EventBindingProvider(SchedulerBindingDataSource owner)
Parameters
owner
The owner scheduler binding data source.
Properties
AppointmentFactory
Gets or sets the factory used to create appointment objects. If not explicitly set, a default factory is used.
Declaration
[Browsable(false)]
public IAppointmentFactory AppointmentFactory { get; set; }
Property Value
ExceptionMapperFactory
Gets or sets the factory used to create exception mappers that handle recurrence exceptions for recurring appointments.
Declaration
[Browsable(false)]
public IExceptionMapperFactory ExceptionMapperFactory { get; set; }
Property Value
IsMasterEventIdCallback
Gets or sets the callback used to determine if an event is a master event based on its master event ID.
Mapping
Gets or sets the mapping information that defines how appointment properties are mapped to data source fields.
Declaration
[Browsable(false)]
public override IMappingInfo Mapping { get; set; }
Property Value
Overrides
ResourceMapperFactory
Gets or sets the factory used to create resource mappers that handle the relationship between appointments and resources.
Declaration
[Browsable(false)]
public IResourceMapperFactory ResourceMapperFactory { get; set; }
Property Value
Methods
CreateInstance()
Creates a new event instance using the configured appointment factory.
Declaration
protected override IEvent CreateInstance()
Returns
A new IEvent instance that can be used in the scheduler.
Overrides
DeleteCore(IEvent)
Deletes an event from the data source. For recurrence exceptions, removes the exception from the master event's exceptions list.
Declaration
protected override void DeleteCore(IEvent itemToDelete)
Parameters
itemToDelete
The event item to delete from the data source.
Overrides
InsertCore(IEvent)
Inserts a new event item into the data source. If the item is a recurrence exception, it is added to the master event's exceptions list.
Declaration
protected override void InsertCore(IEvent itemToInsert)
Parameters
itemToInsert
The event item to insert into the data source.
Overrides
OnCreateSchedulerItemsBegin(PropertyDescriptorCollection)
Called at the beginning of creating scheduler items from the data source. Prepares the resource ID mapping and resets collection mappers.
Declaration
protected override void OnCreateSchedulerItemsBegin(PropertyDescriptorCollection properties)
Parameters
properties
The collection of properties from the data source.
Overrides
OnDataSourceChanged(EventArgs)
Called when the data source is changed. Applies the recurrence ID converter based on the data source type.
Declaration
protected override void OnDataSourceChanged(EventArgs e)
Parameters
e
Event arguments.
Overrides
ProcessDataSourceValue(IEvent, SchedulerMapping, object)
Processes special data source values that require custom handling, such as resources and exceptions. This is called when a value from the data source needs special processing beyond direct property mapping.
Declaration
protected override void ProcessDataSourceValue(IEvent schedulerItem, SchedulerMapping mapping, object value)
Parameters
schedulerItem
The scheduler event item being populated from the data source.
mapping
The mapping information for the property being processed.
value
The value from the data source to be processed.
Overrides
ProcessSchedulerItem(IEvent, object, SchedulerMapping, PropertyDescriptor)
Processes a scheduler item and applies special handling for resource mapping.
Declaration
protected override void ProcessSchedulerItem(IEvent schedulerItem, object dataSourceItem, SchedulerMapping mapping, PropertyDescriptor dataItemProperty)
Parameters
schedulerItem
The scheduler event item to process.
dataSourceItem
The corresponding data source item.
mapping
The mapping definition to use.
dataItemProperty
The property descriptor for the data source property.
Overrides
ResetCollectionMappers()
Resets the collection mappers for resources and exceptions.
Declaration
public void ResetCollectionMappers()
ShouldApplyMapping(SchedulerMapping)
Determines whether a specific mapping should be applied when reading data from the data source. Prevents applying conflicting mappings for resources and master events.
Declaration
protected override bool ShouldApplyMapping(SchedulerMapping mapping)
Parameters
mapping
The mapping to check.
Returns
True if the mapping should be applied; otherwise, false.
Overrides
ShouldReadDataItem(object)
Determines whether a data item from the data source should be read as an event. Filters out items that are recurrence exceptions based on the MasterEventId property.
ToString()
Returns a string that represents the current EventBindingProvider.
Declaration
public override string ToString()
Returns
A string that includes the type name and data source binding status.
Overrides
UpdateChildItems()
Updates child items after the main data processing is complete. Processes the resource update queue to apply resource mappings.
Declaration
protected override void UpdateChildItems()
Overrides
UpdateCore(IEvent, string)
Updates an event in the data source. For recurrence exceptions, updates the exception directly without affecting the master event.