Soenneker.DataTables.Extensions.Types
4.0.88
Prefix Reserved
See the version list below for details.
dotnet add package Soenneker.DataTables.Extensions.Types --version 4.0.88
NuGet\Install-Package Soenneker.DataTables.Extensions.Types -Version 4.0.88
<PackageReference Include="Soenneker.DataTables.Extensions.Types" Version="4.0.88" />
<PackageVersion Include="Soenneker.DataTables.Extensions.Types" Version="4.0.88" />
<PackageReference Include="Soenneker.DataTables.Extensions.Types" />
paket add Soenneker.DataTables.Extensions.Types --version 4.0.88
#r "nuget: Soenneker.DataTables.Extensions.Types, 4.0.88"
#:package Soenneker.DataTables.Extensions.Types@4.0.88
#addin nuget:?package=Soenneker.DataTables.Extensions.Types&version=4.0.88
#tool nuget:?package=Soenneker.DataTables.Extensions.Types&version=4.0.88
Soenneker.DataTables.Extensions.Types
Builds DataTables column definitions from a .NET row type, including JSON names and optional DataTableColumnAttribute configuration.
Installation
dotnet add package Soenneker.DataTables.Extensions.Types
Define a row
using System.Text.Json.Serialization;
using Soenneker.DataTables.Attributes.Column;
public sealed class CustomerRow
{
[DataTableColumn(Title = "Customer", Searchable = true, Orderable = true, Order = 0)]
public required string Name { get; init; }
[JsonPropertyName("created_at")]
[DataTableColumn(Title = "Created", Orderable = true, Width = "12rem", Order = 1)]
public DateTimeOffset CreatedAt { get; init; }
[JsonIgnore]
public string? InternalNote { get; init; }
}
Generate columns
using Soenneker.DataTables.Extensions.Types;
List<DataTableColumn> columns = typeof(CustomerRow).ToDataTableColumns();
The example produces columns whose Data values are name and created_at. Explicit JsonPropertyName values win; otherwise the CLR property name is converted with JsonNamingPolicy.CamelCase.
DataTableColumnAttribute.Data can override the data source entirely. Other attribute values such as title, visibility, CSS class, searchability, ordering, responsive priority, and width are copied to the resulting DTO.
Selection and ordering
- Public instance properties with public getters are included.
- Indexers and properties ignored by
System.Text.Jsonare excluded.[JsonIgnore(Condition = JsonIgnoreCondition.Never)]remains included. - Columns with an explicit non-negative
Ordercome first, in ascending order. - Columns without an explicit order retain their reflection order after explicitly ordered columns.
Make sure the serializer used for row data follows the same names. A custom naming policy can differ from the camel-case fallback; add JsonPropertyName in that case.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Soenneker.DataTables.Attributes.Column (>= 4.0.25)
- Soenneker.DataTables.Dtos.Column (>= 4.0.26)
- Soenneker.Extensions.Char (>= 4.0.102)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.114 | 101 | 10/15/2026 |
| 4.0.113 | 86 | 10/14/2026 |
| 4.0.112 | 86 | 10/14/2026 |
| 4.0.111 | 88 | 10/14/2026 |
| 4.0.110 | 84 | 10/14/2026 |
| 4.0.109 | 86 | 10/14/2026 |
| 4.0.102 | 88 | 10/13/2026 |
| 4.0.101 | 91 | 10/12/2026 |
| 4.0.99 | 92 | 10/12/2026 |
| 4.0.98 | 87 | 10/11/2026 |
| 4.0.97 | 91 | 10/11/2026 |
| 4.0.96 | 87 | 10/11/2026 |
| 4.0.95 | 121 | 9/26/2026 |
| 4.0.94 | 100 | 9/24/2026 |
| 4.0.93 | 97 | 9/24/2026 |
| 4.0.92 | 149 | 9/15/2026 |
| 4.0.91 | 105 | 9/15/2026 |
| 4.0.90 | 114 | 9/12/2026 |
| 4.0.89 | 107 | 9/12/2026 |
| 4.0.88 | 101 | 9/12/2026 |
Update dependency Soenneker.DataTables.Attributes.Column to 4.0.25 (#323)