BindingContext
Namespace: Wisej.Web
Assembly: Wisej.Framework (4.1.0.0)
Manages the collection of BindingManagerBase objects for any object that inherits from the Control class.
- C#
- VB.NET
public class BindingContext : BindingContext
Public Class BindingContext
Inherits BindingContext
Constructors
BindingContext()
Creates a new instance of BindingContext.
Properties
IsReadOnly
Boolean: Returns whether the collection is read-only.
Item(dataSource)
BindingManagerBase: Returns the BindingManagerBase that is associated with the data source.
Item(dataSource, dataMember)
BindingManagerBase: Returns a BindingManagerBase that is associated with the data source and data member.
Throws:
- Exception The specified dataMember does not exist in the specified data source.
Methods
Add(dataSource, listManager)
Adds the BindingManagerBase associated with a specific data source to the collection.
| Parameter | Type | Description |
|---|---|---|
| dataSource | Object | The object associated with the BindingManagerBase. |
| listManager | BindingManagerBase | The BindingManagerBase to add. |
Throws:
- ArgumentNullException dataSource is null, or listManager is null.
AddCore(dataSource, listManager)
Adds the BindingManagerBase associated with a specific data source to the collection.
| Parameter | Type | Description |
|---|---|---|
| dataSource | Object | The object associated with the BindingManagerBase. |
| listManager | BindingManagerBase | The BindingManagerBase to add. |
Throws:
- ArgumentNullException dataSource is null, or listManager is null.
Clear()
Clears the collection of any BindingManagerBase objects.
ClearCore()
Clears the collection of any BindingManagerBase objects.
Contains(dataSource)
Returns whether the BindingContext contains the BindingManagerBase associated with the data source.
| Parameter | Type | Description |
|---|---|---|
| dataSource | Object | An Object that represents the data source. |
Returns: Boolean. true if the BindingContext contains the BindingManagerBase; otherwise, false.
Contains(dataSource, dataMember)
Returns whether the BindingContext contains the BindingManagerBase associated with the data source and data member.
| Parameter | Type | Description |
|---|---|---|
| dataSource | Object | An Object that represents the data source. |
| dataMember | String | The information needed to resolve to a specific BindingManagerBase. |
Returns: Boolean. true if the BindingContext contains the BindingManagerBase; otherwise, false.
Remove(dataSource)
Removes the BindingManagerBase associated with the specified dataSource .
| Parameter | Type | Description |
|---|---|---|
| dataSource | Object | An object that represents the data source. |
RemoveCore(dataSource)
Removes the BindingManagerBase associated with the specified dataSource .
| Parameter | Type | Description |
|---|---|---|
| dataSource | Object | An object that represents the data source. |
UpdateBinding(newBindingContext, binding)
Associates a Binding with a new BindingContext.
| Parameter | Type | Description |
|---|---|---|
| newBindingContext | BindingContext | The new BindingContext to associate with the Binding. |
| binding | Binding | The Binding to associate with the new BindingContext. |
Events
CollectionChanged
CollectionChangeEventHandler Fired when the collection of data sources changes.