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

Represents a base class for data binding providers that facilitate two-way data binding between scheduler items and external data sources, providing mapping capabilities and change tracking.

Definition

Namespace:Telerik.WinControls.UI.Scheduler

Assembly:Telerik.WinControls.Scheduler.dll

Type Parameters:

T

The type of scheduler item that implements IDataBoundItem.

Syntax:

C#
public abstract class BindingProviderBase<T> : BindingSource, IComponent, IDisposable, IBindingListView, IBindingList, IList, ICollection, IEnumerable, ITypedList, ICancelAddNew, ISupportInitializeNotification, ISupportInitialize, ICurrencyManagerProvider, ISchedulerProvider<T> where T : IDataBoundItem

Inheritance: objectMarshalByRefObjectComponentBindingSourceBindingProviderBase<T>

Derived Classes: SchedulerBindingDataSource.EventBindingProviderSchedulerBindingDataSource.ResourceBindingProvider

Implements: IBindingListIBindingListViewICancelAddNewICollectionIComponentICurrencyManagerProviderIDisposableIEnumerableIListISchedulerProvider<T>ISupportInitializeISupportInitializeNotificationITypedList...

Inherited Members BindingSource.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.ToString()Component.CanRaiseEventsComponent.EventsComponent.SiteComponent.ContainerComponent.DesignModeComponent.DisposedMarshalByRefObject.MemberwiseClone(bool)MarshalByRefObject.GetLifetimeService()MarshalByRefObject.InitializeLifetimeService()MarshalByRefObject.CreateObjRef(Type)...

Constructors

Initializes a new instance of the BindingProviderBase<T> class with the specified data source owner.

C#
protected BindingProviderBase(SchedulerBindingDataSource owner)
Parameters:ownerSchedulerBindingDataSource

The SchedulerBindingDataSource that owns this binding provider.

Fields

C#
protected List<T> schedulerItems

Properties

Gets or sets the mapping information that defines how properties of scheduler items correspond to properties in the data source, enabling bidirectional data binding.

C#
public virtual IMappingInfo Mapping { get; set; }

Implements: ISchedulerProvider<T>.Mapping

Gets or sets a value indicating whether changes to the underlying data source should be tracked and synchronized with scheduler items.

C#
public bool TrackDataSourceChanges { get; set; }

Methods

When overridden in a derived class, creates a new instance of the specific scheduler item type.

C#
protected abstract T CreateInstance()
Returns:

T

A new instance of type T.

Deletes a scheduler item from the data source and removes it from the scheduler items collection.

C#
public virtual void Delete(T itemToDelete)
Parameters:itemToDeleteT

The scheduler item to delete from the data source.

Implements: ISchedulerProvider<T>.Delete(T)

Performs the core deletion logic for removing a scheduler item from the data source.

C#
protected virtual void DeleteCore(T itemToDelete)
Parameters:itemToDeleteT

The scheduler item to delete.

Finds a property descriptor in the data source properties collection that matches the specified mapping.

C#
protected PropertyDescriptor FindDataSourceProperty(SchedulerMapping mapping)
Parameters:mappingSchedulerMapping

The scheduler mapping that defines the data source property to find.

Returns:

PropertyDescriptor

The PropertyDescriptor for the data source property, or null if not found.

Retrieves scheduler items from the data source, optionally applying a filter function.

C#
public IEnumerable<T> GetItems(Predicate<T> filterFunction)
Parameters:filterFunctionPredicate<T>

An optional filter function to apply when retrieving items. If null, all items are returned.

Returns:

IEnumerable<T>

An enumerable collection of scheduler items of type T.

Implements: ISchedulerProvider<T>.GetItems(Predicate<T>)

Gets the name of a data source property, allowing for custom property name transformations. Override this method to implement custom property naming strategies.

C#
protected virtual string GetSourcePropertyName(PropertyDescriptor property)
Parameters:propertyPropertyDescriptor

The property descriptor for which to get the name.

Returns:

string

The name to use for the property in data binding operations.

Inserts a new scheduler item into the data source and synchronizes the change with the underlying data store.

C#
public virtual void Insert(T itemToInsert)
Parameters:itemToInsertT

The scheduler item to insert into the data source.

Implements: ISchedulerProvider<T>.Insert(T)

Performs the core insertion logic for adding a scheduler item to the data source.

C#
protected virtual void InsertCore(T itemToInsert)
Parameters:itemToInsertT

The scheduler item to insert.

Called before the process of extracting scheduler items from the data source begins. Override this method to perform initialization or preparation tasks.

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

The collection of properties available on the data source items.

Called after the process of extracting scheduler items from the data source completes. Override this method to perform cleanup or finalization tasks.

C#
protected virtual void OnCreateSchedulerItemsEnd()

Raises the DataMemberChanged event and updates the data properties cache.

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

An EventArgs that contains the event data.

Overrides: BindingSource.OnDataMemberChanged(EventArgs)

Raises the DataSourceChanged event and updates the data properties cache.

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

An EventArgs that contains the event data.

Overrides: BindingSource.OnDataSourceChanged(EventArgs)

Raises the ItemsChanged event to notify subscribers of changes to the scheduler items collection.

C#
protected virtual void OnItemsChanged(ListChangedEventArgs<T> args)
Parameters:argsListChangedEventArgs<T>

The ListChangedEventArgs<T> instance containing the event data.

Raises the ListChanged event and handles synchronization between the data source and scheduler items.

C#
protected override void OnListChanged(ListChangedEventArgs e)
Parameters:eListChangedEventArgs

A ListChangedEventArgs that contains the event data.

Overrides: BindingSource.OnListChanged(ListChangedEventArgs)

Called to process a value from the data source when the corresponding scheduler item property cannot be found or when custom processing is required. Override this method to handle complex mappings.

C#
protected virtual void ProcessDataSourceValue(T schedulerItem, SchedulerMapping mapping, object value)
Parameters:schedulerItemT

The scheduler item being populated.

mappingSchedulerMapping

The mapping configuration for the current property.

valueobject

The value from the data source that needs processing.

Called to process a scheduler item value when updating the data source and custom processing is required. Override this method to handle complex mappings during data source updates.

C#
protected virtual void ProcessSchedulerItem(T schedulerItem, object dataSourceItem, SchedulerMapping mapping, PropertyDescriptor dataItemProperty)
Parameters:schedulerItemT

The scheduler item containing the source value.

dataSourceItemobject

The data source item being updated.

mappingSchedulerMapping

The mapping configuration for the current property.

dataItemPropertyPropertyDescriptor

The property descriptor for the data source property being updated.

Populates a scheduler item with data from the corresponding data source item using the configured property mappings.

C#
protected virtual void ReadSchedulerItem(T schedulerItem, object item)
Parameters:schedulerItemT

The scheduler item to populate with data.

itemobject

The data source item containing the source data.

Determines whether a specific mapping should be applied during data binding operations. Override this method to implement conditional mapping logic.

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

The scheduler mapping to evaluate.

Returns:

bool

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

Determines whether a specific data source item should be processed and converted to a scheduler item. Override this method to implement custom filtering logic during data source enumeration.

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

The data source item to evaluate.

Returns:

bool

true if the item should be processed; otherwise, false.

Updates an existing scheduler item in the data source with new property values.

C#
public virtual void Update(T itemToUpdate, string propertyName)
Parameters:itemToUpdateT

The scheduler item to update in the data source.

propertyNamestring

The name of the specific property that changed, or null/empty to update all properties.

Implements: ISchedulerProvider<T>.Update(T, string)

Updates any child or related items after a modification operation. Override this method to provide custom child item synchronization logic.

C#
protected virtual void UpdateChildItems()

Performs the core update logic for modifying a scheduler item in the data source.

C#
protected virtual void UpdateCore(T itemToUpdate, string propertyName)
Parameters:itemToUpdateT

The scheduler item to update.

propertyNamestring

The name of the specific property that changed, or null/empty to update all properties.

Updates the properties of a data source item with values from the corresponding scheduler item.

C#
protected void UpdateDataItem(T itemToUpdate, object dataItem, string propertyName)
Parameters:itemToUpdateT

The scheduler item containing the source values.

dataItemobject

The data source item to update.

propertyNamestring

The name of the specific property to update, or null/empty to update all properties.

Updates all mapped properties of a data source item with values from the corresponding scheduler item.

C#
protected virtual void UpdateDataItemProperties(object item, T schedulerItem)
Parameters:itemobject

The data source item to update.

schedulerItemT

The scheduler item containing the source values.

Updates a specific property of a data source item with the corresponding value from a scheduler item using the provided mapping.

C#
protected virtual bool UpdateDataItemProperty(object item, T schedulerItem, SchedulerMapping mapping)
Parameters:itemobject

The data source item to update.

schedulerItemT

The scheduler item containing the source value.

mappingSchedulerMapping

The mapping configuration that defines the property relationship.

Returns:

bool

true if the property was successfully updated; otherwise, false.

Updates the cached collection of data source property descriptors based on the current data list.

C#
protected void UpdateDataPropertiesCache()

Updates the cached collection of scheduler item property descriptors based on the current scheduler item type.

C#
protected void UpdateSchedulerPropertiesCache()

Events

Occurs when the scheduler items collection changes due to data source modifications.

C#
public event EventHandler<ListChangedEventArgs<T>> ItemsChanged

Implements: ISchedulerProvider<T>.ItemsChanged