# SETSCROLLPOSITION

#### Syntax <a href="#syntax" id="syntax"></a>

**SETSCROLLPOSITION**(*widget*; *position*; *orientation*)

* *widget* - the widget, for which the scroll position should be set - ***Value type**: widget*
* *position* - the position (number of the row), on which the vertical scrollbar should be set for widget - ***Value type**: number*
* *orientation* - specifies if the new position should be applied for the rows or the columns of the table widget - ***Value type**: constant (optional, default: vertical)*

  Possible values are

  * *vertical* - position is applied on the vertical scroll bar
  * *horizontal* - position is applied on the horizontal scroll bar

#### Remarks <a href="#remarks" id="remarks"></a>

* When the function is called, the table will be scrolled, so that the row/column defined by *position* is on top of the table (position 1 - row 1 is on top, position 2 - row 2 is on top, …). It doesn't matter if the rows or columns have different heights or widths.
* If *widget* is used as a "scroll binding" widget by other widgets, these widgets are scrolled as well (pixel-based, as usual).
* If *widget* is using a "scroll binding" widget, the function does nothing.
* If *widget* is on another page, the function does nothing.
* If *position* is less than 1, position 1 is used instead.
* If *position* is greater than the max scroll position of the table, the max scroll position is used instead.
* If the function is called multiple times for a widget, only the last defined position is applied.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.nedyx.com/nedyx/clearlines-functions/widget-functions/setscrollposition.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
