New to Telerik UI for WinFormsStart a free 30-day trial

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:

C#
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

Initializes a new instance of the SchedulerBindingDataSource.EventBindingProvider class.

C#
public EventBindingProvider(SchedulerBindingDataSource owner)
Parameters:ownerSchedulerBindingDataSource

The owner scheduler binding data source.

Properties

Gets or sets the factory used to create appointment objects. If not explicitly set, a default factory is used.

C#
[Browsable(false)]
public IAppointmentFactory AppointmentFactory { get; set; }

Gets or sets the factory used to create exception mappers that handle recurrence exceptions for recurring appointments.

C#
[Browsable(false)]
public IExceptionMapperFactory ExceptionMapperFactory { get; set; }

Gets or sets the callback used to determine if an event is a master event based on its master event ID.

C#
public Predicate<object> IsMasterEventIdCallback { get; set; }

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

C#
[Browsable(false)]
public override IMappingInfo Mapping { get; set; }

Overrides: BindingProviderBase<IEvent>.Mapping

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

C#
[Browsable(false)]
public IResourceMapperFactory ResourceMapperFactory { get; set; }

Methods

Creates a new event instance using the configured appointment factory.

C#
protected override IEvent CreateInstance()
Returns:

IEvent

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

Overrides: BindingProviderBase<IEvent>.CreateInstance()

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

C#
protected override void DeleteCore(IEvent itemToDelete)
Parameters:itemToDeleteIEvent

The event item to delete from the data source.

Overrides: BindingProviderBase<IEvent>.DeleteCore(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.

C#
protected override void InsertCore(IEvent itemToInsert)
Parameters:itemToInsertIEvent

The event item to insert into the data source.

Overrides: BindingProviderBase<IEvent>.InsertCore(IEvent)

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

C#
protected override void OnCreateSchedulerItemsBegin(PropertyDescriptorCollection properties)
Parameters:propertiesPropertyDescriptorCollection

The collection of properties from the data source.

Overrides: BindingProviderBase<IEvent>.OnCreateSchedulerItemsBegin(PropertyDescriptorCollection)

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

C#
protected override void OnDataSourceChanged(EventArgs e)
Parameters:eEventArgs

Event arguments.

Overrides: BindingProviderBase<IEvent>.OnDataSourceChanged(EventArgs)

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.

C#
protected override void ProcessDataSourceValue(IEvent schedulerItem, SchedulerMapping mapping, object value)
Parameters:schedulerItemIEvent

The scheduler event item being populated from the data source.

mappingSchedulerMapping

The mapping information for the property being processed.

valueobject

The value from the data source to be processed.

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

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

C#
protected override void ProcessSchedulerItem(IEvent schedulerItem, object dataSourceItem, SchedulerMapping mapping, PropertyDescriptor dataItemProperty)
Parameters:schedulerItemIEvent

The scheduler event item to process.

dataSourceItemobject

The corresponding data source item.

mappingSchedulerMapping

The mapping definition to use.

dataItemPropertyPropertyDescriptor

The property descriptor for the data source property.

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

Resets the collection mappers for resources and exceptions.

C#
public void ResetCollectionMappers()

Determines whether a specific mapping should be applied when reading data from the data source. Prevents applying conflicting mappings for resources and master events.

C#
protected override bool ShouldApplyMapping(SchedulerMapping mapping)
Parameters:mappingSchedulerMapping

The mapping to check.

Returns:

bool

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

Overrides: BindingProviderBase<IEvent>.ShouldApplyMapping(SchedulerMapping)

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.

C#
protected override bool ShouldReadDataItem(object item)
Parameters:itemobject

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)

Returns a string that represents the current EventBindingProvider.

C#
public override string ToString()
Returns:

string

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

Overrides: Component.ToString()

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

C#
protected override void UpdateChildItems()

Overrides: BindingProviderBase<IEvent>.UpdateChildItems()

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

C#
protected override void UpdateCore(IEvent itemToUpdate, string propertyName)
Parameters:itemToUpdateIEvent

The event item to update.

propertyNamestring

Name of the property that was changed.

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