# SetSortingColumns(int[], bool[])

> Sets multiple sorting columns and the associated sorting orders.

## Definition

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

```csharp
public void SetSortingColumns(int[] columnIndices, bool[] sortAscending)
```

### Parameters

**** (\[int\[]]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Column indices of the sorted columns.**** (\[bool\[]]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Sorting order for the column indices specified.

### Remarks

This function sets multiple sorting columns and the associated sorting orders. The first entry is the primary sorted column. It also triggers the [MultiColumnHeader.sortingChanged](/engine/6000.6/script-reference/unityeditor/imgui/controls/multicolumnheader/sortingchanged.md) event if the sorting state changes. You can input two empty arrays to clear the sorting columns so no sorting would happen.

Additional Resources: [MultiColumnHeader.SetSorting](/engine/6000.6/script-reference/unityeditor/imgui/controls/multicolumnheader/setsorting.md).
