# BindingsCollection

Namespace: **Wisej.Web**

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

Represents a collection of [Binding](https://docs.wisej.com/api/wisej.web/data-binding/wisej.web.binding) objects for a control.

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

```csharp
public class BindingsCollection : ICollection, IEnumerable
```

{% endtab %}

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

```visual-basic
Public Class BindingsCollection
    Inherits ICollection
    Implements IEnumerable
```

{% 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 total number of bindings in the collection.

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

[Binding](https://docs.wisej.com/api/wisej.web/data-binding/wisej.web.binding): Returns the [Binding](https://docs.wisej.com/api/wisej.web/data-binding/wisej.web.binding) at the specified index.

**Throws:**

* [IndexOutOfRangeException](https://docs.microsoft.com/dotnet/api/system.indexoutofrangeexception) The collection doesn't contain an item at the specified index.

## 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) ReadValues()

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

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

Takes the current values from the control and writes them to the 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) CollectionChanged

[CollectionChangeEventHandler](https://docs.microsoft.com/dotnet/api/system.componentmodel.collectionchangeeventhandler) Fired when the collection 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) CollectionChanging

[CollectionChangeEventHandler](https://docs.microsoft.com/dotnet/api/system.componentmodel.collectionchangeeventhandler) Fired when the collection is about to change.
