# CollectionSortItem Class

> Stores data about fields that viewers use for sorting collection items.

- Product: Adobe PDF Library 21
- Language: .NET Framework
- Version: APDFL21.0.0PlusP1e
- HTML page: https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/class/CollectionSortItem
- Version index: https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/llms.txt

```csharp
class CollectionSortItem : SystemIDisposable
```

**Namespace:** `Datalogics::PDFL`

**Inherits from:** `SystemIDisposable`

## Description

Stores data about fields that viewers use for sorting collection items.

Collections are aslo known as portfolios.

**Referenced by:** [`Collection`](https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/class/Collection.md)

## Constructors

### CollectionSortItem

```csharp
Datalogics.PDFL.CollectionSortItem.CollectionSortItem(string fieldID, bool order)
```

*constructor*

**Parameters**

- `fieldID` (`string`): the schema field's id.
- `order` (`bool`): true for ascending, false for descending

CCollectionSortItem allows to construct sort item which will be used for collection sorting.

## Properties

### Ascending

```csharp
bool Datalogics.PDFL.CollectionSortItem.Ascending { get; }
```

Gets whether the sort order is ascending.

### Name

```csharp
string Datalogics.PDFL.CollectionSortItem.Name { get; }
```

Gets the field name used for sorting.

This is the schema field identifier that determines which collection field is used as the sort key.

## Methods

### Dispose

```csharp
void Datalogics.PDFL.CollectionSortItem.Dispose()
```

**Returns:** `void`
