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

# setGridAutoRefresh

Sets the auto refresh interval for grids. Only valid for grids with this setting enabled.

### Parameters

1. controlId - id of the grid control
2. autoRefreshSeconds - The value can be 0 to switch auto refresh off. Any other value must align with the defined values for this grid. For settings see Setting grid autorefresh

### Example Usages

```javascript
   brixxApi.setGridAutoRefresh(myGrid, 0); //this will switch the auto refresh off
   brixxApi.setGridAutoRefresh(myGrid, 120); //this will switch the auto refresh to 120 seconds (2 minutes). The parameter is only valid, if 120 is allowed with the settings for this grid.
```
