Class SchedulerBindingDataSource.EventBindingProvider
Provides binding functionality for scheduler events, handling data mapping between data source items and scheduler events.
Inheritance
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.Scheduler.dll
Syntax
public class EventBindingProvider : BindingProviderBase<IEvent>, ISchedulerProvider<IEvent>
Constructors
EventBindingProvider(SchedulerBindingDataSource)
Initializes a new instance of the SchedulerBindingDataSource.EventBindingProvider class.
Declaration
public EventBindingProvider(SchedulerBindingDataSource owner)
Parameters
SchedulerBindingDataSource
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
public IAppointmentFactory AppointmentFactory { get; set; }
Property Value
IAppointmentFactory
|
ExceptionMapperFactory
Gets or sets the factory used to create exception mappers that handle recurrence exceptions for recurring appointments.
Declaration
public IExceptionMapperFactory ExceptionMapperFactory { get; set; }
Property Value
IExceptionMapperFactory
|
IsMasterEventIdCallback
Gets or sets the callback used to determine if an event is a master event based on its master event ID.
Declaration
public Predicate<object> IsMasterEventIdCallback { get; set; }
Property Value
System.Predicate<System.Object>
|
Mapping
Gets or sets the mapping information that defines how appointment properties are mapped to data source fields.
Declaration
public override IMappingInfo Mapping { get; set; }
Property Value
IMappingInfo
|
Overrides
ResourceMapperFactory
Gets or sets the factory used to create resource mappers that handle the relationship between appointments and resources.
Declaration
public IResourceMapperFactory ResourceMapperFactory { get; set; }
Property Value
IResourceMapperFactory
|
Methods
CreateInstance()
Creates a new event instance using the configured appointment factory.
Declaration
protected override IEvent CreateInstance()
Returns
IEvent
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
IEvent
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
IEvent
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
System.ComponentModel.PropertyDescriptorCollection
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
System.EventArgs
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
IEvent
schedulerItem
The scheduler event item being populated from the data source. |
SchedulerMapping
mapping
The mapping information for the property being processed. |
System.Object
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
IEvent
schedulerItem
The scheduler event item to process. |
System.Object
dataSourceItem
The corresponding data source item. |
SchedulerMapping
mapping
The mapping definition to use. |
System.ComponentModel.PropertyDescriptor
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
SchedulerMapping
mapping
The mapping to check. |
Returns
System.Boolean
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.
Declaration
protected override bool ShouldReadDataItem(object item)
Parameters
System.Object
item
The data item to check. |
Returns
System.Boolean
True if the data item should be read as an event; otherwise, false. |
Overrides
ToString()
Returns a string that represents the current EventBindingProvider.
Declaration
public override string ToString()
Returns
System.String
A string that includes the type name and data source binding status. |
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.
Declaration
protected override void UpdateCore(IEvent itemToUpdate, string propertyName)
Parameters
IEvent
itemToUpdate
The event item to update. |
System.String
propertyName
Name of the property that was changed. |