# BindingManagerBase

Namespace: **Wisej.Web**

Assembly: **Wisej.Framework** (4.0.0.0)

Manages all [Binding](https://docs.wisej.com/api/wisej.web/data-binding/wisej.web.binding) objects that are bound to the same data source and data member.

{% tabs %}
{% tab title="C#" %}

```csharp
public class BindingManagerBase
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Class BindingManagerBase
```

{% endtab %}
{% endtabs %}

## Properties

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Bindings

[BindingsCollection](https://docs.wisej.com/api/wisej.web/data-binding/wisej.web.bindingscollection): Returns the collection of bindings being managed.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Count

[Int32](https://docs.microsoft.com/dotnet/api/system.int32): Returns the number of items in the list.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Current

[Object](https://docs.microsoft.com/dotnet/api/system.object): Returns the current item in the list.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) IsBindingSuspended

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns whether binding is suspended.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Position

[Int32](https://docs.microsoft.com/dotnet/api/system.int32): Returns or sets the position of the data binding source within the list.

## Methods

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) AddNew()

Adds a new item to the underlying list.

**Throws:**

* [NotSupportedException](https://docs.microsoft.com/dotnet/api/system.notsupportedexception) The underlying data source does not implement [IBindingList](https://docs.microsoft.com/dotnet/api/system.componentmodel.ibindinglist), or the data source has thrown an exception because the user has attempted to add a row to a read-only or fixed-size [DataView](https://docs.microsoft.com/dotnet/api/system.data.dataview).

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) CancelCurrentEdit()

Cancels the current edit operation.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) EndCurrentEdit()

Ends the current edit operation.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) GetItemProperties()

Returns the property descriptor collection for the underlying list.

**Returns:** [PropertyDescriptorCollection](https://docs.microsoft.com/dotnet/api/system.componentmodel.propertydescriptorcollection). A [PropertyDescriptorCollection](https://docs.microsoft.com/dotnet/api/system.componentmodel.propertydescriptorcollection) for the list.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) RemoveAt(index)

Removes the item at the specified index.

| Parameter | Type                                                        | Description                                    |
| --------- | ----------------------------------------------------------- | ---------------------------------------------- |
| **index** | [Int32](https://docs.microsoft.com/dotnet/api/system.int32) | The index of the item to remove from the list. |

**Throws:**

* [IndexOutOfRangeException](https://docs.microsoft.com/dotnet/api/system.indexoutofrangeexception) There is no row at the specified *index* .

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) ResetCurrentItem()

Causes a control bound to this data source to re-read the current item and refresh the displayed value.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) ResetItem(itemIndex)

Causes a control bound to this data source to re-read the item at the specified *itemIndex* and refresh the displayed value.

| Parameter     | Type                                                        | Description                             |
| ------------- | ----------------------------------------------------------- | --------------------------------------- |
| **itemIndex** | [Int32](https://docs.microsoft.com/dotnet/api/system.int32) | The index of the item that has changed. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) ResumeBinding()

Resumes data binding.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) SuspendBinding()

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

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) UpdateBindings()

Reads the current values from the data source and sends them to the control.

## Events

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) BindingComplete

[BindingCompleteEventHandler](https://docs.wisej.com/api/wisej.web/data-binding/wisej.web.bindingcompleteeventhandler) Fired at the completion of a data-binding operation.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) CurrentChanged

[EventHandler](https://docs.microsoft.com/dotnet/api/system.eventhandler) Fired when the currently bound item changes.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) CurrentItemChanged

[EventHandler](https://docs.microsoft.com/dotnet/api/system.eventhandler) Fired when the state of the currently bound item changes.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) DataError

[BindingManagerDataErrorEventHandler](https://docs.wisej.com/api/wisej.web/data-binding/wisej.web.bindingmanagerdataerroreventhandler) Fired when an [Exception](https://docs.microsoft.com/dotnet/api/system.exception) is silently handled by the [BindingManagerBase](https://docs.wisej.com/api/wisej.web/data-binding/wisej.web.bindingmanagerbase).

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) PositionChanged

[EventHandler](https://docs.microsoft.com/dotnet/api/system.eventhandler) Fired after the value of the [Position](#position) property has changed.

## Inherited By

| Name                                                                                           | Description                                                                                                                                                |
| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [CurrencyManager](https://docs.wisej.com/api/wisej.web/data-binding/wisej.web.currencymanager) | Keeps data-bound controls synchronized with each other: showing data from the same record.                                                                 |
| [PropertyManager](https://docs.wisej.com/api/wisej.web/data-binding/wisej.web.propertymanager) | Maintains a [Binding](https://docs.wisej.com/api/wisej.web/data-binding/wisej.web.binding) between an object's property and a data-bound control property. |
