# sortedColumnIndex

> This property holds the index to the primary sorted column.

## Definition

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

```csharp
public int sortedColumnIndex { get; set; }
```

### Remarks

This property holds the index to the primary sorted column with the default value of -1 (no sorting).

Use the [MultiColumnHeaderState.sortedColumns](/engine/6000.7/script-reference/unityeditor/imgui/controls/multicolumnheaderstate/sortedcolumns.md) array which contains the history of the most recent sorted columns, to sort multiple columns. The first entry in that array is the primary sorted column.
