# CurrencyManager

Namespace: **Wisej.Web**

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

* [BindingManagerBase](https://docs.wisej.com/api/wisej.web/data-binding/wisej.web.bindingmanagerbase)
  * [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.

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

```csharp
public class CurrencyManager : BindingManagerBase
```

{% endtab %}

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

```visual-basic
Public Class CurrencyManager
    Inherits 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) 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) List

[IList](https://docs.microsoft.com/dotnet/api/system.collections.ilist): Returns the list for this [CurrencyManager](https://docs.wisej.com/api/wisej.web/data-binding/wisej.web.currencymanager).

### ![](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 current position within 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) ShouldBind

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns true when the bound data source can accept changes. Calling [SuspendBinding](#suspendbinding) sets this flag to false and [ResumeBinding](#resumebinding) sets it to true (default).

## 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 collection element doesn't implement a public parameterless constructor, 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) Refresh()

Forces a refresh of the data-bound 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) 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.

## 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) ItemChanged

[ItemChangedEventHandler](https://docs.wisej.com/api/wisej.web/data-binding/wisej.web.itemchangedeventhandler) Fired when the current item has been altered.

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

[ListChangedEventHandler](https://docs.microsoft.com/dotnet/api/system.componentmodel.listchangedeventhandler) Fired when the list changes or an item in the list 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) MetaDataChanged

[EventHandler](https://docs.microsoft.com/dotnet/api/system.eventhandler) Fired when the metadata of the [List](#list) has changed.
