# TableOptions.CustomStyle Property

> TableOptions.CustomStyle property in the TX Sheet Control .NET API: Named custom table recipe containing name and elements.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Property
- **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)
- **Path:** TX Sheet Control > API Reference > .NET API > TXTextControl.TXSheetControl.Server > TableOptions > TableOptions.CustomStyle Property
- **452 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/tableoptions/customstyle-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/tableoptions/customstyle-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/tableoptions/customstyle-property/llms-full.txt

---

Named custom table recipe containing `name` and `elements`. Each element supplies `type`, optional stripe `size` and sparse `formatting`. The recipe applies while its name matches `Style`; omitted recipes use built-in styles.

### Syntax

```csharp
public object? CustomStyle { get; init; }
```

A named sparse table recipe. It applies while its name matches style. Direct formatting overrides table formatting; conditional rules have highest priority. See [Tables](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/tables/llms-full.txt) for recipe roles and precedence. Validation errors reject the asynchronous operation without changing the table.

### Example

```csharp
using TXTextControl.TXSheetControl.Server;

async Task ApplyBudgetStyle(Table table, CancellationToken cancellationToken)
{
    await table.UpdateAsync(new TableOptions {
        Style = "Budget",
        CustomStyle = new { name = "Budget", elements = new[] {
            new { type = "headerRow", formatting = new { bold = true, fillColor = "#a4d4b4" } },
            new { type = "wholeTable", formatting = new { bold = false, fillColor = "#f2f2f2" } }
        } }
    }, cancellationToken);
}
```

---

## Nearby

- **Previous:** [TableOptions.Style Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/tableoptions/style-property/llms-full.txt)
- **Next:** [TabularLoadOptions Class](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/tabularloadoptions/llms-full.txt)
