TX Text Control .NET for Windows Forms

SortingInstruction Constructor

Constructor|Introduced in 26.0
Namespace
TXTextControl.DocumentServer.DataShaping
Package
TXTextControl.TextControl.WinForms.SDK as TXDocumentServer.dll from the private NuGet feed or Text Control Offline Packages

Description

Initializes a new instance of the SortingInstruction class.

Syntax

SortingInstruction(string, SortOrder)

Sets the column name to order the data by and sets the sort order (ascending / descending).

public SortingInstruction(string orderBy, SortOrder sortOrder);
ParameterDescription
orderBy

The name of the column to order the block data by.

sortOrder

The sort order.

ValueMeaning
AscendingData rows are sorted in an ascending order.
DescendingData rows are sorted in a descending order.

SortingInstruction(string)

Sets the column name to order the data by and sets the sort order to SortOrder.Ascending.

public SortingInstruction(string orderBy);
ParameterDescription
orderBy

The name of the column to order the block data by.

Examples

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

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