Class
SchedulerBindingDataSource.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:

cs-api-definition
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: IBindingListIBindingListViewICancelAddNewICollectionIComponentICurrencyManagerProviderIDisposableIEnumerableIListISchedulerProvider<IEvent>ISupportInitializeISupportInitializeNotificationITypedList

Inherited Members BindingProviderBase<IEvent>.schedulerItemsBindingProviderBase<IEvent>.UpdateDataPropertiesCache()BindingProviderBase<IEvent>.UpdateSchedulerPropertiesCache()BindingProviderBase<IEvent>.OnListChanged(ListChangedEventArgs)BindingProviderBase<IEvent>.OnDataMemberChanged(EventArgs)BindingProviderBase<IEvent>.GetItems(Predicate<IEvent>)BindingProviderBase<IEvent>.Insert(IEvent)BindingProviderBase<IEvent>.Update(IEvent, string)BindingProviderBase<IEvent>.UpdateDataItem(IEvent, object, string)BindingProviderBase<IEvent>.Delete(IEvent)BindingProviderBase<IEvent>.OnItemsChanged(ListChangedEventArgs<IEvent>)BindingProviderBase<IEvent>.OnCreateSchedulerItemsEnd()BindingProviderBase<IEvent>.FindDataSourceProperty(SchedulerMapping)BindingProviderBase<IEvent>.ReadSchedulerItem(IEvent, object)BindingProviderBase<IEvent>.UpdateDataItemProperties(object, IEvent)BindingProviderBase<IEvent>.UpdateDataItemProperty(object, IEvent, SchedulerMapping)BindingProviderBase<IEvent>.GetSourcePropertyName(PropertyDescriptor)BindingProviderBase<IEvent>.TrackDataSourceChangesBindingProviderBase<IEvent>.ItemsChangedBindingSource.GetRelatedCurrencyManager(string)BindingSource.CancelEdit()BindingSource.Dispose(bool)BindingSource.EndEdit()BindingSource.Find(string, object)BindingSource.MoveFirst()BindingSource.MoveLast()BindingSource.MoveNext()BindingSource.MovePrevious()BindingSource.OnAddingNew(AddingNewEventArgs)BindingSource.OnBindingComplete(BindingCompleteEventArgs)BindingSource.OnCurrentChanged(EventArgs)BindingSource.OnCurrentItemChanged(EventArgs)BindingSource.OnDataError(BindingManagerDataErrorEventArgs)BindingSource.OnPositionChanged(EventArgs)BindingSource.RemoveCurrent()BindingSource.ResetAllowNew()BindingSource.ResetBindings(bool)BindingSource.ResetCurrentItem()BindingSource.ResetItem(int)BindingSource.ResumeBinding()BindingSource.SuspendBinding()BindingSource.GetEnumerator()BindingSource.CopyTo(Array, int)BindingSource.Add(object)BindingSource.Clear()BindingSource.Contains(object)BindingSource.IndexOf(object)BindingSource.Insert(int, object)BindingSource.Remove(object)BindingSource.RemoveAt(int)BindingSource.GetListName(PropertyDescriptor[])BindingSource.GetItemProperties(PropertyDescriptor[])BindingSource.AddNew()BindingSource.Find(PropertyDescriptor, object)BindingSource.RemoveSort()BindingSource.RemoveFilter()BindingSource.CurrencyManagerBindingSource.CurrentBindingSource.DataMemberBindingSource.DataSourceBindingSource.IsBindingSuspendedBindingSource.ListBindingSource.PositionBindingSource.RaiseListChangedEventsBindingSource.SortBindingSource.CountBindingSource.IsSynchronizedBindingSource.SyncRootBindingSource.this[int]BindingSource.IsFixedSizeBindingSource.IsReadOnlyBindingSource.AllowEditBindingSource.AllowNewBindingSource.AllowRemoveBindingSource.SupportsChangeNotificationBindingSource.SupportsSearchingBindingSource.SupportsSortingBindingSource.IsSortedBindingSource.FilterBindingSource.SupportsAdvancedSortingBindingSource.SupportsFilteringBindingSource.AddingNewBindingSource.BindingCompleteBindingSource.DataErrorBindingSource.DataSourceChangedBindingSource.DataMemberChangedBindingSource.CurrentChangedBindingSource.CurrentItemChangedBindingSource.ListChangedBindingSource.PositionChangedComponent.Dispose()Component.GetService(Type)Component.CanRaiseEventsComponent.EventsComponent.SiteComponent.ContainerComponent.DesignModeComponent.DisposedMarshalByRefObject.MemberwiseClone(bool)MarshalByRefObject.GetLifetimeService()MarshalByRefObject.InitializeLifetimeService()MarshalByRefObject.CreateObjRef(Type)

Constructors

EventBindingProvider(SchedulerBindingDataSource)

Initializes a new instance of the SchedulerBindingDataSource.EventBindingProvider class.

Declaration

cs-api-definition
public EventBindingProvider(SchedulerBindingDataSource owner)

Parameters

owner

SchedulerBindingDataSource

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

cs-api-definition
[Browsable(false)]
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

cs-api-definition
[Browsable(false)]
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

cs-api-definition
public Predicate<object> IsMasterEventIdCallback { get; set; }

Property Value

Predicate<object>

Mapping

Gets or sets the mapping information that defines how appointment properties are mapped to data source fields.

Declaration

cs-api-definition
[Browsable(false)]
public override IMappingInfo Mapping { get; set; }

Property Value

IMappingInfo

Overrides BindingProviderBase<IEvent>.Mapping

ResourceMapperFactory

Gets or sets the factory used to create resource mappers that handle the relationship between appointments and resources.

Declaration

cs-api-definition
[Browsable(false)]
public IResourceMapperFactory ResourceMapperFactory { get; set; }

Property Value

IResourceMapperFactory

Methods

CreateInstance()

Creates a new event instance using the configured appointment factory.

Declaration

cs-api-definition
protected override IEvent CreateInstance()

Returns

IEvent

A new IEvent instance that can be used in the scheduler.

Overrides BindingProviderBase<IEvent>.CreateInstance()

DeleteCore(IEvent)

Deletes an event from the data source. For recurrence exceptions, removes the exception from the master event's exceptions list.

Declaration

cs-api-definition
protected override void DeleteCore(IEvent itemToDelete)

Parameters

itemToDelete

IEvent

The event item to delete from the data source.

Overrides BindingProviderBase<IEvent>.DeleteCore(IEvent)

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

cs-api-definition
protected override void InsertCore(IEvent itemToInsert)

Parameters

itemToInsert

IEvent

The event item to insert into the data source.

Overrides BindingProviderBase<IEvent>.InsertCore(IEvent)

OnCreateSchedulerItemsBegin(PropertyDescriptorCollection)

Called at the beginning of creating scheduler items from the data source. Prepares the resource ID mapping and resets collection mappers.

Declaration

cs-api-definition
protected override void OnCreateSchedulerItemsBegin(PropertyDescriptorCollection properties)

Parameters

properties

PropertyDescriptorCollection

The collection of properties from the data source.

Overrides BindingProviderBase<IEvent>.OnCreateSchedulerItemsBegin(PropertyDescriptorCollection)

OnDataSourceChanged(EventArgs)

Called when the data source is changed. Applies the recurrence ID converter based on the data source type.

Declaration

cs-api-definition
protected override void OnDataSourceChanged(EventArgs e)

Parameters

e

EventArgs

Event arguments.

Overrides BindingProviderBase<IEvent>.OnDataSourceChanged(EventArgs)

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

cs-api-definition
protected override void ProcessDataSourceValue(IEvent schedulerItem, SchedulerMapping mapping, object value)

Parameters

schedulerItem

IEvent

The scheduler event item being populated from the data source.

mapping

SchedulerMapping

The mapping information for the property being processed.

value

object

The value from the data source to be processed.

Overrides BindingProviderBase<IEvent>.ProcessDataSourceValue(IEvent, SchedulerMapping, object)

ProcessSchedulerItem(IEvent, object, SchedulerMapping, PropertyDescriptor)

Processes a scheduler item and applies special handling for resource mapping.

Declaration

cs-api-definition
protected override void ProcessSchedulerItem(IEvent schedulerItem, object dataSourceItem, SchedulerMapping mapping, PropertyDescriptor dataItemProperty)

Parameters

schedulerItem

IEvent

The scheduler event item to process.

dataSourceItem

object

The corresponding data source item.

mapping

SchedulerMapping

The mapping definition to use.

dataItemProperty

PropertyDescriptor

The property descriptor for the data source property.

Overrides BindingProviderBase<IEvent>.ProcessSchedulerItem(IEvent, object, SchedulerMapping, PropertyDescriptor)

ResetCollectionMappers()

Resets the collection mappers for resources and exceptions.

Declaration

cs-api-definition
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

cs-api-definition
protected override bool ShouldApplyMapping(SchedulerMapping mapping)

Parameters

mapping

SchedulerMapping

The mapping to check.

Returns

bool

True if the mapping should be applied; otherwise, false.

Overrides BindingProviderBase<IEvent>.ShouldApplyMapping(SchedulerMapping)

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

cs-api-definition
protected override bool ShouldReadDataItem(object item)

Parameters

item

object

The data item to check.

Returns

bool

True if the data item should be read as an event; otherwise, false.

Overrides BindingProviderBase<IEvent>.ShouldReadDataItem(object)

ToString()

Returns a string that represents the current EventBindingProvider.

Declaration

cs-api-definition
public override string ToString()

Returns

string

A string that includes the type name and data source binding status.

Overrides Component.ToString()

UpdateChildItems()

Updates child items after the main data processing is complete. Processes the resource update queue to apply resource mappings.

Declaration

cs-api-definition
protected override void UpdateChildItems()

Overrides BindingProviderBase<IEvent>.UpdateChildItems()

UpdateCore(IEvent, string)

Updates an event in the data source. For recurrence exceptions, updates the exception directly without affecting the master event.

Declaration

cs-api-definition
protected override void UpdateCore(IEvent itemToUpdate, string propertyName)

Parameters

itemToUpdate

IEvent

The event item to update.

propertyName

string

Name of the property that was changed.

Overrides BindingProviderBase<IEvent>.UpdateCore(IEvent, string)