Class BindingProviderBase<T>
Represents a base class that the SchedulerBindingDataSource.EventBindingProvider classes extend.
Inheritance
Namespace: Telerik.WinControls.UI.Scheduler
Assembly: Telerik.WinControls.Scheduler.dll
Syntax
public abstract class BindingProviderBase<T> : BindingSource, ISchedulerProvider<T> where T : IDataBoundItem
Type Parameters
T
|
Constructors
BindingProviderBase(SchedulerBindingDataSource)
Initializes a new instance of the BindingProviderBase<T> class.
Declaration
protected BindingProviderBase(SchedulerBindingDataSource owner)
Parameters
SchedulerBindingDataSource
owner
The owner. |
Fields
schedulerItems
Declaration
protected List<T> schedulerItems
Field Value
System.Collections.Generic.List<T>
|
Properties
Mapping
Gets or sets the mapping information that connects properties of scheduler items with properties from the data source.
Declaration
public virtual IMappingInfo Mapping { get; set; }
Property Value
IMappingInfo
The mapping. |
Implements
TrackDataSourceChanges
Declaration
public bool TrackDataSourceChanges { get; set; }
Property Value
System.Boolean
|
Methods
CreateInstance()
Creates a specific scheduler item.
Declaration
protected abstract T CreateInstance()
Returns
T
|
Delete(T)
Deletes the specified item from the data source.
Declaration
public virtual void Delete(T itemToDelete)
Parameters
T
itemToDelete
The item to delete. |
Implements
DeleteCore(T)
Declaration
protected virtual void DeleteCore(T itemToDelete)
Parameters
T
itemToDelete
|
FindDataSourceProperty(SchedulerMapping)
Declaration
protected PropertyDescriptor FindDataSourceProperty(SchedulerMapping mapping)
Parameters
SchedulerMapping
mapping
|
Returns
System.ComponentModel.PropertyDescriptor
|
GetItems(Predicate<T>)
Gets the items from the data source.
Declaration
public IEnumerable<T> GetItems(Predicate<T> filterFunction)
Parameters
System.Predicate<T>
filterFunction
An optional filter function. |
Returns
System.Collections.Generic.IEnumerable<T>
|
Implements
GetSourcePropertyName(PropertyDescriptor)
Declaration
protected virtual string GetSourcePropertyName(PropertyDescriptor property)
Parameters
System.ComponentModel.PropertyDescriptor
property
|
Returns
System.String
|
Insert(T)
Inserts the specified item in the data source.
Declaration
public virtual void Insert(T itemToInsert)
Parameters
T
itemToInsert
The item to insert. |
Implements
InsertCore(T)
Declaration
protected virtual void InsertCore(T itemToInsert)
Parameters
T
itemToInsert
|
OnCreateSchedulerItemsBegin(PropertyDescriptorCollection)
Called before all scheduler items are extracted from the data source.
Declaration
protected virtual void OnCreateSchedulerItemsBegin(PropertyDescriptorCollection properties)
Parameters
System.ComponentModel.PropertyDescriptorCollection
properties
|
OnCreateSchedulerItemsEnd()
Called after all scheduler items are extracted from the data source.
Declaration
protected virtual void OnCreateSchedulerItemsEnd()
OnDataMemberChanged(EventArgs)
Raises the System.Windows.Forms.BindingSource.DataMemberChanged event.
Declaration
protected override void OnDataMemberChanged(EventArgs e)
Parameters
System.EventArgs
e
An System.EventArgs that contains the event data. |
OnDataSourceChanged(EventArgs)
Raises the System.Windows.Forms.BindingSource.DataSourceChanged event.
Declaration
protected override void OnDataSourceChanged(EventArgs e)
Parameters
System.EventArgs
e
An System.EventArgs that contains the event data. |
OnItemsChanged(ListChangedEventArgs<T>)
Raises the ItemsChanged event.
Declaration
protected virtual void OnItemsChanged(ListChangedEventArgs<T> args)
Parameters
ListChangedEventArgs<T>
args
The ListChangedEventArgs<T> instance containing the event data. |
OnListChanged(ListChangedEventArgs)
Raises the System.Windows.Forms.BindingSource.ListChanged event.
Declaration
protected override void OnListChanged(ListChangedEventArgs e)
Parameters
System.ComponentModel.ListChangedEventArgs
e
An System.EventArgs that contains the event data. |
ProcessDataSourceValue(T, SchedulerMapping, Object)
Called to process a value from the data source when the target sheduler item property as per the mapping cannot be found.
Declaration
protected virtual void ProcessDataSourceValue(T schedulerItem, SchedulerMapping mapping, object value)
Parameters
T
schedulerItem
The scheduler item. |
SchedulerMapping
mapping
The mapping. |
System.Object
value
The value. |
ProcessSchedulerItem(T, Object, SchedulerMapping, PropertyDescriptor)
Declaration
protected virtual void ProcessSchedulerItem(T schedulerItem, object dataSourceItem, SchedulerMapping mapping, PropertyDescriptor dataItemProperty)
Parameters
T
schedulerItem
|
System.Object
dataSourceItem
|
SchedulerMapping
mapping
|
System.ComponentModel.PropertyDescriptor
dataItemProperty
|
ReadSchedulerItem(T, Object)
Creates a scheduler item given a data source item.
Declaration
protected virtual void ReadSchedulerItem(T schedulerItem, object item)
Parameters
T
schedulerItem
The source properties. |
System.Object
item
The data source item. |
ShouldApplyMapping(SchedulerMapping)
Declaration
protected virtual bool ShouldApplyMapping(SchedulerMapping mapping)
Parameters
SchedulerMapping
mapping
|
Returns
System.Boolean
|
ShouldReadDataItem(Object)
Declaration
protected virtual bool ShouldReadDataItem(object item)
Parameters
System.Object
item
|
Returns
System.Boolean
|
Update(T, String)
Updates the specified item in the data source.
Declaration
public virtual void Update(T itemToUpdate, string propertyName)
Parameters
T
itemToUpdate
The item to update. |
System.String
propertyName
Name of the property which value changed. Null or an empty string if all properties should be updated. |
Implements
UpdateChildItems()
Declaration
protected virtual void UpdateChildItems()
UpdateCore(T, String)
Declaration
protected virtual void UpdateCore(T itemToUpdate, string propertyName)
Parameters
T
itemToUpdate
|
System.String
propertyName
|
UpdateDataItem(T, Object, String)
Declaration
protected void UpdateDataItem(T itemToUpdate, object dataItem, string propertyName)
Parameters
T
itemToUpdate
|
System.Object
dataItem
|
System.String
propertyName
|
UpdateDataItemProperties(Object, T)
Updates the data item properties.
Declaration
protected virtual void UpdateDataItemProperties(object item, T schedulerItem)
Parameters
System.Object
item
The item. |
T
schedulerItem
The scheduler item. |
UpdateDataItemProperty(Object, T, SchedulerMapping)
Declaration
protected virtual bool UpdateDataItemProperty(object item, T schedulerItem, SchedulerMapping mapping)
Parameters
System.Object
item
|
T
schedulerItem
|
SchedulerMapping
mapping
|
Returns
System.Boolean
|
UpdateDataPropertiesCache()
Declaration
protected void UpdateDataPropertiesCache()
UpdateSchedulerPropertiesCache()
Declaration
protected void UpdateSchedulerPropertiesCache()
Events
ItemsChanged
Declaration
public event EventHandler<ListChangedEventArgs<T>> ItemsChanged
Event Type
System.EventHandler<ListChangedEventArgs<T>>
|