> 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/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
app.setGridAutoRefresh(myGrid, 0); //this will switch the auto refresh off
app.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.
```

### Return Values

Function does not explicitly produce return value.
