# Observable Data and Refresh Data

The most common reason you would use an ObservableCollection is to make a component (like a grid, treeview, treelist, dropdown) change or react when you change that collection.

When you want to refresh the component data source like that, there are two important framework behaviors you need to be aware of - when ObservableCollection instances fire events, and how to refresh the data of a component when it is not an observable collection.

In this article:

* [Observable data](https://www.telerik.com/blazor-ui/documentation/common-features/data-binding/observable-data#observable-data)
* [Refresh Data](https://www.telerik.com/blazor-ui/documentation/common-features/data-binding/observable-data#refresh-data)
* [Telerik components that support Observable Data](https://www.telerik.com/blazor-ui/documentation/common-features/data-binding/observable-data#telerik-components-that-support-observable-data)

## Observable Data

Databound components can benefit from live updates - when the data source collection changes, the components should update to reflect that change. Most data-bound components in the Telerik UI for Blazor suite implement such functionality.

When the `Data` of the component is a collection that implements the `INotifyCollectionChanged` interface (such as `ObservableCollection`), the Telerik components subscribe to its `CollectionChanged` event to make live update. This means that adding items, removing items, or clearing the collection updates the components (its `.Add()`, `.Remove()` and `.Clear()` methods).

The Observable collections fire the `CollectionChanged` event only when their `Add`, `Remove` and `Clear` methods are called. They do not fire it when you change the value of a field of one of their elements.

## Refresh Data

In Blazor, the framework will fire the `OnParametersSet` event of a child component (which is how child components can react to outside changes) only when it can detect a change in the object it receives through the corresponding parameter (like `Data` for the data sources of Telerik components). This detection works as follows:

* For strings and [value types](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/value-types), this happens when their value changes.

* For [reference types](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/reference-types) (such as data collections like `List`, or any `IEnumerable`, and application-specific objects), this happens when the object reference changes.

  Thus, you would usually need to create a `new` reference for the view-model field (such as `TreeViewData = new List<MyTreeViewItem>(theUpdatedDataCollection);`) when you want the component to update.

## Telerik components that support Observable Data

The following components support observable data for their `Data` parameter. Note that observable data is not supported with manual data binding via the `OnRead` event.

* [AutoComplete](https://www.telerik.com/blazor-ui/documentation/components/autocomplete/refresh-data)

* [Carousel](https://www.telerik.com/blazor-ui/documentation/components/carousel/refresh-data)

* [ComboBox](https://www.telerik.com/blazor-ui/documentation/components/combobox/refresh-data)

* [DropDownList](https://www.telerik.com/blazor-ui/documentation/components/dropdownlist/refresh-data)

* [Grid documentation](https://www.telerik.com/blazor-ui/documentation/components/grid/refresh-data), [live demo](https://demos.telerik.com/blazor-ui/grid/observable-data)

* [ListView](https://www.telerik.com/blazor-ui/documentation/components/listview/refresh-data)

* [MultiSelect](https://www.telerik.com/blazor-ui/documentation/components/multiselect/refresh-data)

* [TreeList](https://www.telerik.com/blazor-ui/documentation/components/treelist/refresh-data)

* [TreeView](https://www.telerik.com/blazor-ui/documentation/components/treeview/refresh-data)

You can refresh other components that do not support observable data by creating a [New collection reference](https://www.telerik.com/blazor-ui/documentation/common-features/data-binding/observable-data#refresh-data).

* [Scheduler](https://www.telerik.com/blazor-ui/documentation/components/scheduler/refresh-data)

* [Menu](https://www.telerik.com/blazor-ui/documentation/components/menu/refresh-data)

* [Drawer](https://www.telerik.com/blazor-ui/documentation/components/drawer/refresh-data)

* [ContextMenu](https://www.telerik.com/blazor-ui/documentation/components/contextmenu/refresh-data)

## See Also

* [INotifyCollectionChanged Interface](https://docs.microsoft.com/en-us/dotnet/api/system.collections.specialized.inotifycollectionchanged?view=netframework-4.8)
* [Live Demos](https://demos.telerik.com/blazor-ui)
