# DataSourceUpdateMode

Namespace: **Wisej.Web**

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

Specifies when a data source is updated when the bound control properties are changed.

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

```csharp
public enum DataSourceUpdateMode : Enum
```

{% endtab %}

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

```visual-basic
Public Enum DataSourceUpdateMode As [Enum]
```

{% endtab %}
{% endtabs %}

## Fields

| Name                  | Description                                                                                           |
| --------------------- | ----------------------------------------------------------------------------------------------------- |
| **Never**             | The data source is never updated and values entered into the control are not parsed, or re-formatted. |
| **OnPropertyChanged** | The data source is updated whenever the value of the control property changes.                        |
| **OnValidation**      | The data source is updated when the control property is validated.                                    |

## Used By

| Name                                                                                                                                                                                                                                                | Description                                                                                                                                                                                                                                                                   |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [IBinding.DataSourceUpdateMode](https://docs.wisej.com/api/wisej.web/wisej.web.ibinding#datasourceupdatemode)                                                                                                                                       | Returns or sets a value that indicates when changes to the bound control property are propagated to the data source.                                                                                                                                                          |
| [Binding.DataSourceUpdateMode](https://docs.wisej.com/api/wisej.web/wisej.web.binding#datasourceupdatemode)                                                                                                                                         | Returns or sets a value that indicates when changes to the bound control property are propagated to the data source.                                                                                                                                                          |
| [ControlBindingsCollection.DefaultDataSourceUpdateMode](https://docs.wisej.com/api/wisej.web/wisej.web.controlbindingscollection#defaultdatasourceupdatemode)                                                                                       | Returns or sets the default [DataSourceUpdateMode](https://docs.wisej.com/api/wisej.web/data-binding/wisej.web.datasourceupdatemode) for a [Binding](https://docs.wisej.com/api/wisej.web/data-binding/wisej.web.binding) in the collection.                                  |
| [ControlBindingsCollection.Add](https://docs.wisej.com/api/wisej.web/wisej.web.controlbindingscollection#add-binding)                                                                                                                               | Creates a binding that binds the specified control property to the specified data member of the specified data source, optionally enabling formatting, propagating values to the data source based on the specified update setting, and adding the binding to the collection. |
| [BindingExtensions.Bind](https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.bindingextensions#bind-component-targetprop-datasource-sourceprop-formattingenabled-updatemode-nullvalue-formatstring-formatprovider-parse-format) | Binds a specified property of a component to a property of a data source.                                                                                                                                                                                                     |
