Soenneker.DataTables.Extensions.Types 4.0.102

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Soenneker.DataTables.Extensions.Types --version 4.0.102
                    
NuGet\Install-Package Soenneker.DataTables.Extensions.Types -Version 4.0.102
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Soenneker.DataTables.Extensions.Types" Version="4.0.102" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.DataTables.Extensions.Types" Version="4.0.102" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.DataTables.Extensions.Types" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Soenneker.DataTables.Extensions.Types --version 4.0.102
                    
#r "nuget: Soenneker.DataTables.Extensions.Types, 4.0.102"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Soenneker.DataTables.Extensions.Types@4.0.102
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Soenneker.DataTables.Extensions.Types&version=4.0.102
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.DataTables.Extensions.Types&version=4.0.102
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

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.Json are excluded. [JsonIgnore(Condition = JsonIgnoreCondition.Never)] remains included.
  • Columns with an explicit non-negative Order come 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
Loading failed

Update dependency Soenneker.DataTables.Attributes.Column to 4.0.30 (#352)