---
description: >-
  Sets the auto refresh interval for grids. Only valid for grids with this
  setting enabled.
---

# setGridAutoRefresh

## 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.
