> For the complete documentation index, see [llms.txt](https://gebra-it.gitbook.io/wiki/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gebra-it.gitbook.io/wiki/client-api-reference/functions/refreshdatasource.md).

# refreshDataSource

Refreshes the content of a single control based on its DataSource (not the SubDataSource!). If outside parameters have changed, you can force the Gebra Suite to reload the content of that control.

## Parameters

1\. controlId - (optional) id of the control, that you want to reload. If this is empty, all controls with datasources are refreshed.

## Example Usages

```javascript
app.refreshDataSource("myControlId"); //Refreshes just "myControlId"
```

```javascript
app.refreshDataSource(); //Refreshes all Controls with a DataSource in the app
```

### Return Values

The function uses an inner function getSingleControlDataFromDataSource to perform the actual data source refresh for a single control. This inner function is an asynchronous function that makes a call to the brixxCallEventProcessor function with the appropriate parameters. The return type is a Promise that resolves to the result of the data source refresh operation.
