## Sort(int) {#sort}

Sorts the datas ascend in the range by index.

```csharp
public void Sort(int index)
```

| Parameter | Type | Description |
| --- | --- | --- |
| index | Int32 | The column(or row) index that specifis the sort column(or row). If sort orientation is top to bottom, the index represents column index. If sort orientation is left to right, the index represents row index. |

### See Also

* class [SortRange](../)
* namespace [Aspose.Cells.GridDesktop](../../../aspose.cells.griddesktop/)
* assembly [Aspose.Cells.GridDesktop](../../../)

---

## Sort(int, SortOrder) {#sort_1}

Sorts the datas in the range by index.

```csharp
public void Sort(int index, SortOrder order)
```

| Parameter | Type | Description |
| --- | --- | --- |
| index | Int32 | The column(or row) index that specifis the sort column(or row). If sort orientation is top to bottom, the index represents column index. If sort orientation is left to right, the index represents row index. |
| order | SortOrder | The sort order |

### See Also

* enum [SortOrder](../../sortorder/)
* class [SortRange](../)
* namespace [Aspose.Cells.GridDesktop](../../../aspose.cells.griddesktop/)
* assembly [Aspose.Cells.GridDesktop](../../../)

---

## Sort(int[]) {#sort_2}

Sorts the datas ascend in the range by some field that are specifed by array indexes.

```csharp
public void Sort(int[] indexes)
```

| Parameter | Type | Description |
| --- | --- | --- |
| indexes | Int32[] | The index array that specifies the data sorted by. |

### See Also

* class [SortRange](../)
* namespace [Aspose.Cells.GridDesktop](../../../aspose.cells.griddesktop/)
* assembly [Aspose.Cells.GridDesktop](../../../)

---

## Sort(int[], SortOrder[]) {#sort_3}

Sorts the datas in the range by some field that are specifed by array indexes.

```csharp
public void Sort(int[] indexes, SortOrder[] orders)
```

| Parameter | Type | Description |
| --- | --- | --- |
| indexes | Int32[] | The index array that specifies the data sorted by. |
| orders | SortOrder[] | The sort order array |

### See Also

* enum [SortOrder](../../sortorder/)
* class [SortRange](../)
* namespace [Aspose.Cells.GridDesktop](../../../aspose.cells.griddesktop/)
* assembly [Aspose.Cells.GridDesktop](../../../)


