Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/soenneker/soenneker.blazor.datatables

A Blazor interop library for DataTables
https://github.com/soenneker/soenneker.blazor.datatables

blazor csharp datatables datatablesinterop dotnet interop javascript js

Last synced: 3 months ago
JSON representation

A Blazor interop library for DataTables

Awesome Lists containing this project

README

        

[![](https://img.shields.io/nuget/v/soenneker.blazor.datatables.svg?style=for-the-badge)](https://www.nuget.org/packages/soenneker.blazor.datatables/)
[![](https://img.shields.io/github/actions/workflow/status/soenneker/soenneker.blazor.datatables/publish-package.yml?style=for-the-badge)](https://github.com/soenneker/soenneker.blazor.datatables/actions/workflows/publish-package.yml)
[![](https://img.shields.io/nuget/dt/soenneker.blazor.datatables.svg?style=for-the-badge)](https://www.nuget.org/packages/soenneker.blazor.datatables/)

# ![](https://user-images.githubusercontent.com/4441470/224455560-91ed3ee7-f510-4041-a8d2-3fc093025112.png) Soenneker.Blazor.DataTables
### A Blazor interop library for DataTables

This library simplifies the integration of DataTables into Blazor applications, providing access to options, events, etc. A demo project showcasing common usages is included.

Diligence was taken to align the Blazor API with JS. Refer to the [DataTables documentation](https://datatables.net/) for details. This is a work-in-progress; contribution is welcomed.

## Installation

```
dotnet add package Soenneker.Blazor.DataTables
```

### Add the following to your `Startup.cs` file

```csharp
public void ConfigureServices(IServiceCollection services)
{
services.AddDataTables();
}
```

## Usage

```razor
@using Soenneker.Blazor.DataTables



Name
Position
Office
Age
Start date
Salary




John Doe
Developer
London
28
2017/04/25
$320,800

@code{

private readonly DataTableOptions _options_ = new()
{
Searching = true,
LengthChange = false,
Info = false,
Paging = false,
Order = [new object[] {0, "asc"}]
};
}
```