# SortingInstruction Class

> The SortingInstruction class contains merge block data sorting information such as the sort order and the column name to sort the data rows after. It is used by the MergeBlockInfo class.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Class
- **Introduced:** 26.0
- **Namespace:** `TXTextControl.DocumentServer.DataShaping`
- **Package:** `TXTextControl.TextControl.WinForms.SDK` (assembly `TXDocumentServer.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXDocumentServer.dll` from the setup
- **Path:** TX Text Control .NET for Windows Forms > Reference > TXTextControl.DocumentServer.DataShaping > SortingInstruction Class
- **625 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-datashaping/sortinginstruction/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-datashaping/sortinginstruction/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-datashaping/sortinginstruction/llms-full.txt

---

### Description

The SortingInstruction class contains merge block data sorting information such as the sort order and the column name to sort the data rows after. It is used by the [MergeBlockInfo](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-datasources/mergeblockinfo/llms-full.txt) class.

### Syntax

```csharp
public class SortingInstruction
```

```vbnet
Public Class SortingInstruction
```

### Examples

The following example creates a Sorting Instruction instance and configures its order by setting for a document workflow.

```csharp
TXTextControl.DocumentServer.DataShaping.SortingInstruction sortingInstruction = new("Quarterly report");
sortingInstruction.OrderBy = "Quarterly report";
```

```vbnet
Dim sortingInstruction As New TXTextControl.DocumentServer.DataShaping.SortingInstruction("Quarterly report")
sortingInstruction.OrderBy = "Quarterly report"
```

---

## In This Section

- [SortingInstruction Constructor](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-datashaping/sortinginstruction/constructor/llms-full.txt): Initializes a new instance of the SortingInstruction class.
- [SortingInstruction.Culture Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-datashaping/sortinginstruction/culture-property/llms-full.txt): Gets or sets the format provider for numerical value comparison. The default value for this property is the invariant culture.
- [SortingInstruction.OrderBy Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-datashaping/sortinginstruction/orderby-property/llms-full.txt): Gets or sets the table column name to order the data by.
- [SortingInstruction.SortOrder Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-datashaping/sortinginstruction/sortorder-property/llms-full.txt): Gets or sets the sort order (ascending / descending).

---

## Nearby

- **Previous:** [FilterInstruction.LogicalOperator Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-datashaping/filterinstruction/logicaloperator-property/llms-full.txt)
- **Next:** [SortingInstruction Constructor](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-datashaping/sortinginstruction/constructor/llms-full.txt)
