# SwapColumns(int, int)

> Invoked when two columns are being swapped.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor.Search](/engine/6000.6/script-reference/unityeditor/search.md)
* **Assembly:** UnityEditor

```csharp
void SwapColumns(int columnIndex, int swappedColumnIndex)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Index of the column being swapped or dragged.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Index of the column being swapped with the dragged column.
