[]
        
(Showing Draft Content)

C1.Schedule.C1BindingSource

C1BindingSource Class

The C1BindingSource encapsulates the data source.

Namespace: C1.Schedule
Assembly: C1.ScheduleCore.dll
Syntax
[ComplexBindingProperties("DataSource", "DataMember")]
public class C1BindingSource : Component, IComponent, IDisposable, IBindingListView, IBindingList, IList, ICollection, IEnumerable, ITypedList, ISupportInitializeNotification, ISupportInitialize

Constructors

Name Description
C1BindingSource()

Initializes a new instance of the C1BindingSource class.

C1BindingSource(object, string)

Initializes a new instance of the C1BindingSource class with the specified data source and data member values.

Properties

Name Description
AllowEdit

Gets a value indicating whether items in the underlying list can be edited.

AllowNew

Gets or sets a value indicating whether the AddNew() method can be used to add items to the list.

AllowRemove

Gets a value indicating whether items can be removed from the underlying list.

Count

Gets the total number of items in the underlying list.

DataKeyNamesInternal
DataMember

Gets or sets the specific list in the data source to which the connector currently binds to.

DataSource

Gets or sets the data source that the connector binds to.

IsFixedSize

Gets a value indicating whether the underlying list has a fixed size.

IsReadOnly

Gets a value indicating whether the underlying list is read-only.

IsSynchronized

Gets a value indicating whether access to the collection is synchronized (thread safe).

this[int]

Gets or sets the list element at the specified index.

List

Gets the list that the connector is bound to.

SupportsChangeNotification

Gets a value indicating whether the data source supports change notification.

SupportsSearching

Gets a value indicating whether the data source supports searching with the Find method.

SyncRoot

Gets an object that can be used to synchronize access to the underlying list.

Methods

Name Description
Add(object)

Adds an existing item to the internal list.

AddNew()

Adds a new item to the underlying list.

BeginEdit(object)

Starts an edit operation on the specified object.

Clear()

Removes all elements from the list.

Contains(object)

Determines whether an object is an item in the list.

CopyTo(Array, int)

Copies the contents of the List to the specified array, starting at the specified index value.

Dispose(bool)

Releases all resources used by the C1BindingSource.

EndEdit(object)

Applies pending changes to the underlying data source.

Find(PropertyDescriptor, object)

Searches for the index of the item that has the given property descriptor.

Find(string, object)

Returns the index of the item in the list with the specified property name and value.

FinishAddNew()

Commits a pending new item to the collection.

GetEnumerator()

Retrieves an enumerator for the List.

GetItemProperties(PropertyDescriptor[])

Retrieves an array of PropertyDescriptor objects representing the bindable properties of the data source list type.

GetListName(PropertyDescriptor[])

Gets the name of the list supplying data for the binding.

GetListOrTypeItemProperties(object)

For internal use.

IndexOf(object)

Searches for the specified object and returns the index of the first occurrence within the entire list.

Insert(int, object)

Inserts an item into the list at the specified index.

OnAddingNew(AddingNewEventArgs)
OnDataMemberChanged(EventArgs)
OnDataSourceChanged(EventArgs)
OnListChanged(ListChangedEventArgs)
Remove(object)

Removes the specified item from the list.

RemoveAt(int)

Removes the item at the specified index in the list.

ResetBindings(bool)

Causes a control bound to the C1BindingSource to reread all the items in the list and refresh their displayed values.

ResetItem(int)

Causes a control bound to the C1BindingSource to re-read the item at the specified index, and refresh its displayed value.

Events

Name Description
AddingNew

Occurs before an item is added to the underlying list.

DataMemberChanged

Occurs when the DataMember property value has changed.

DataSourceChanged

Occurs when the DataSource property value has changed.

ListChanged

Occurs when the underlying list changes or an item in the list changes.