# DimensionCollection Class

> DimensionCollection class in the TX Sheet Control .NET API: Worksheet-scoped server API contract; requests retain document identity and cancellation semantics.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Class
- **Namespace:** `TXTextControl.TXSheetControl.Server`
- **Package:** `TXTextControl.TXSheetControl.Server` (assembly `TXTextControl.TXSheetControl.Api.dll`, from the private NuGet feed or the supplied NuGet folder)
- **Package:** `TXTextControl.TXSheetControl.Blazor` (assembly `TXTextControl.TXSheetControl.Api.dll`, from the private NuGet feed or the supplied NuGet folder)
- **Inherits:** `TXTextControl.TXSheetControl.Server.DocumentObject`
- **Path:** TX Sheet Control > API Reference > .NET API > TXTextControl.TXSheetControl.Server > DimensionCollection Class
- **1013 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dimensioncollection/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dimensioncollection/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dimensioncollection/llms-full.txt

---

Worksheet-scoped server API contract; requests retain document identity and cancellation semantics.

### Syntax

```csharp
public class DimensionCollection
```

### Members

#### Properties

| Property | Description |
|---|---|
| [Sheet](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dimensioncollection/sheet-property/llms-full.txt) |  |

#### Methods

| Method | Description |
|---|---|
| [At](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dimensioncollection/at-method/llms-full.txt) | Creates or updates a document-bound handle or queued operation; the owning workbook retains validation authority. |
| [Get](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dimensioncollection/get-method/llms-full.txt) | Creates or updates a document-bound handle or queued operation; the owning workbook retains validation authority. |
| [GetAllAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dimensioncollection/getallasync-method/llms-full.txt) | Performs an operation on this document without activating another worksheet. |
| [GetCountAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dimensioncollection/getcountasync-method/llms-full.txt) | Performs an operation on this document without activating another worksheet. |
| [InsertAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dimensioncollection/insertasync-method/llms-full.txt) | Performs an operation on this document without activating another worksheet. |
| [RemoveAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dimensioncollection/removeasync-method/llms-full.txt) | Deletes count dimensions starting at a zero-based index. |
| [SetHiddenAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dimensioncollection/sethiddenasync-method/llms-full.txt) | Hides or reveals consecutive rows or columns in one undoable edit, retaining stored sizes. Worksheet protection applies. |

### Examples

Build a small report using this document API and return its PDF bytes. Pass a live control with a fresh workbook; the caller owns its lifetime.

```csharp
using TXTextControl.TXSheetControl.Server;

async Task<byte[]> CreateDimensionCollectionReportAsync(ServerSheetControl control)
{
    var book = control.Workbook;
    var sheet = await book.Sheets.AtAsync(0);
    await sheet.Cell("B8").SetValueAsync(120);
    await sheet.Cell("B9").SetValueAsync(80);
    await sheet.Cell("B10").SetFormulaAsync("=SUM(B8:B9)");

    var dimensionCollection = sheet.Rows;
    await dimensionCollection.At(0).SetHeightAsync(new { points = 28 });
    return await control.SaveAsync(StreamType.PDF);
}
```

### See Also

- [TXTextControl.TXSheetControl.Server Namespace](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/llms-full.txt)
- [Workbooks and Worksheets](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/workbooks/llms-full.txt)

---

## In This Section

- [DimensionCollection.At Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dimensioncollection/at-method/llms-full.txt): DimensionCollection.At method in the TX Sheet Control .NET API: Creates or updates a document-bound handle or queued operation.
- [DimensionCollection.Get Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dimensioncollection/get-method/llms-full.txt): DimensionCollection.Get method in the TX Sheet Control .NET API: Creates or updates a document-bound handle or queued operation.
- [DimensionCollection.GetAllAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dimensioncollection/getallasync-method/llms-full.txt): DimensionCollection.GetAllAsync method in the TX Sheet Control .NET API: Performs an operation on this document without activating another worksheet.
- [DimensionCollection.GetCountAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dimensioncollection/getcountasync-method/llms-full.txt): DimensionCollection.GetCountAsync method in the TX Sheet Control .NET API: Performs an operation on this document without activating another worksheet.
- [DimensionCollection.InsertAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dimensioncollection/insertasync-method/llms-full.txt): DimensionCollection.InsertAsync method in the TX Sheet Control .NET API: Performs an operation on this document without activating another worksheet.
- [DimensionCollection.RemoveAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dimensioncollection/removeasync-method/llms-full.txt): DimensionCollection.RemoveAsync method in the TX Sheet Control .NET API: Deletes count dimensions starting at a zero-based index.
- [DimensionCollection.SetHiddenAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dimensioncollection/sethiddenasync-method/llms-full.txt): DimensionCollection.SetHiddenAsync method in the .NET API: Hides or reveals consecutive rows or columns in one undoable edit, retaining stored sizes.
- [DimensionCollection.Sheet Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dimensioncollection/sheet-property/llms-full.txt): DimensionCollection.Sheet property in the TX Sheet Control .NET API, with its syntax, its type Worksheet and a C# example.

---

## Nearby

- **Previous:** [Dimension.SetWidthAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dimension/setwidthasync-method/llms-full.txt)
- **Next:** [DimensionCollection.At Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/dimensioncollection/at-method/llms-full.txt)
