System.Windows.Forms.BindingSource Members

The members of System.Windows.Forms.BindingSource are listed below.

See Also: Inherited members from System.ComponentModel.Component

Public Constructors

Initializes a new instance of the System.Windows.Forms.BindingSource class to the default property values.

Initializes a new instance of the System.Windows.Forms.BindingSource class and adds the System.Windows.Forms.BindingSource to the specified container.

Initializes a new instance of the System.Windows.Forms.BindingSource class with the specified data source and data member.

Public Properties

[read-only]
AllowEditbool.

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

AllowNewbool.

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

[read-only]
AllowRemovebool.

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

[read-only]
Countint.

Gets the total number of items in the underlying list, taking the current BindingSource.Filter value into consideration.

[read-only]
CurrencyManagerCurrencyManager.

Gets the currency manager associated with this System.Windows.Forms.BindingSource.

[read-only]
Currentobject.

Gets the current item in the list.

DataMemberstring.

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

DataSourceobject.

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

Filterstring.

Gets or sets the expression used to filter which rows are viewed.

[read-only]
IsBindingSuspendedbool.

Gets a value indicating whether the list binding is suspended.

[read-only]
IsFixedSizebool.

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

[read-only]
IsReadOnlybool.

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

[read-only]
IsSortedbool.

Gets a value indicating whether the items in the underlying list are sorted.

[read-only]
IsSynchronizedbool.

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

default property
Item(int)object. Documentation for this section has not yet been entered.
[read-only]
ListIList.

Gets the list that the connector is bound to.

Positionint.

Gets or sets the index of the current item in the underlying list.

RaiseListChangedEventsbool.

Gets or sets a value indicating whether BindingSource.ListChanged events should be raised.

Sortstring.

Gets or sets the column names used for sorting, and the sort order for viewing the rows in the data source.

[read-only]
SortDescriptionsSystem.ComponentModel.ListSortDescriptionCollection.

Gets the collection of sort descriptions applied to the data source.

[read-only]
SortDirectionSystem.ComponentModel.ListSortDirection.

Gets the direction the items in the list are sorted.

[read-only]
SortPropertySystem.ComponentModel.PropertyDescriptor.

Gets the System.ComponentModel.PropertyDescriptor that is being used for sorting the list.

[read-only]
SupportsAdvancedSortingbool.

Gets a value indicating whether the data source supports multi-column sorting.

[read-only]
SupportsChangeNotificationbool.

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

[read-only]
SupportsFilteringbool.

Gets a value indicating whether the data source supports filtering.

[read-only]
SupportsSearchingbool.

Gets a value indicating whether the data source supports searching with the BindingSource.Find(System.ComponentModel.PropertyDescriptor, object) method.

[read-only]
SupportsSortingbool.

Gets a value indicating whether the data source supports sorting.

[read-only]
SyncRootobject.

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

Public Methods

Add(object) : int

Adds an existing item to the internal list.

AddNew() : object

Adds a new item to the underlying list.

ApplySort(System.ComponentModel.ListSortDescriptionCollection)

Sorts the data source with the specified sort descriptions.

ApplySort(System.ComponentModel.PropertyDescriptor, System.ComponentModel.ListSortDirection)

Sorts the data source using the specified property descriptor and sort direction.

CancelEdit()

Cancels the current edit operation.

Clear()

Removes all elements from the list.

Contains(object) : bool

Determines whether an object is an item in the list.

CopyTo(Array, int)

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

EndEdit()

Applies pending changes to the underlying data source.

Find(System.ComponentModel.PropertyDescriptor, object) : int

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

Find(string, object) : int

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

GetEnumerator() : IEnumerator

Retrieves an enumerator for the BindingSource.List.

GetItemProperties(System.ComponentModel.PropertyDescriptor[]) : System.ComponentModel.PropertyDescriptorCollection

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

GetListName(System.ComponentModel.PropertyDescriptor[]) : string

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

GetRelatedCurrencyManager(string) : CurrencyManager

Gets the related currency manager for the specified data member.

IndexOf(object) : int

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.

MoveFirst()

Moves to the first item in the list.

MoveLast()

Moves to the last item in the list.

MoveNext()

Moves to the next item in the list.

MovePrevious()

Moves to the previous item in the list.

Remove(object)

Removes the specified item from the list.

RemoveAt(int)

Removes the item at the specified index in the list.

RemoveCurrent()

Removes the current item from the list.

RemoveFilter()

Removes the filter associated with the System.Windows.Forms.BindingSource.

RemoveSort()

Removes the sort associated with the System.Windows.Forms.BindingSource.

ResetAllowNew()

Reinitializes the BindingSource.AllowNew property.

ResetBindings(bool)

Causes a control bound to the System.Windows.Forms.BindingSource to reread all the items in the list and refresh their displayed values.

ResetCurrentItem()

Causes a control bound to the System.Windows.Forms.BindingSource to reread the currently selected item and refresh its displayed value.

ResetItem(int)

Causes a control bound to the System.Windows.Forms.BindingSource to reread the item at the specified index, and refresh its displayed value.

ResumeBinding()

Resumes data binding.

SuspendBinding()

Suspends data binding to prevent changes from updating the bound data source.

Protected Methods

Public Events

AddingNew

Occurs before an item is added to the underlying list.

BindingComplete

Occurs when all the clients have been bound to this System.Windows.Forms.BindingSource.

CurrentChanged

Occurs when the currently bound item changes.

CurrentItemChanged

Occurs when a property value of the BindingSource.Current property has changed.

DataError

Occurs when a currency-related exception is silently handled by the System.Windows.Forms.BindingSource.

DataMemberChanged

Occurs when the BindingSource.DataMember property value has changed.

DataSourceChanged

Occurs when the BindingSource.DataSource property value has changed.

ListChanged

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

PositionChanged

Occurs after the value of the BindingSource.Position property has changed.

Explicitly Implemented Interface Members

System.ComponentModel.IBindingList.AddIndex

Adds the System.ComponentModel.PropertyDescriptor to the indexes used for searching.

System.ComponentModel.ISupportInitialize.BeginInit

Signals the System.Windows.Forms.BindingSource that initialization is starting.

System.ComponentModel.ICancelAddNew.CancelNew

Discards a pending new item from the collection.

System.ComponentModel.ISupportInitialize.EndInit

Signals the System.Windows.Forms.BindingSource that initialization is complete.

System.ComponentModel.ICancelAddNew.EndNew

Commits a pending new item to the collection.

[read-only]
System.ComponentModel.ISupportInitializeNotification.IsInitializedbool.

Gets a value indicating whether the System.Windows.Forms.BindingSource is initialized.

System.ComponentModel.IBindingList.RemoveIndex

Removes the System.ComponentModel.PropertyDescriptor from the indexes used for searching.