# SetSortDirection(int, bool)

> Change sort direction for a given column.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor.IMGUI.Controls](/engine/6000.6/script-reference/unityeditor/imgui/controls.md)
* **Assembly:** UnityEditor.CoreModule

```csharp
public void SetSortDirection(int columnIndex, bool sortAscending)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Column index.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Direction of the sorting.
