DatatableJS.Net 3.0.1

Suggested Alternatives

RazorKit.DataTables

There is a newer version of this package available.
See the version list below for details.
dotnet add package DatatableJS.Net --version 3.0.1                
NuGet\Install-Package DatatableJS.Net -Version 3.0.1                
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="DatatableJS.Net" Version="3.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DatatableJS.Net --version 3.0.1                
#r "nuget: DatatableJS.Net, 3.0.1"                
#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.
// Install DatatableJS.Net as a Cake Addin
#addin nuget:?package=DatatableJS.Net&version=3.0.1

// Install DatatableJS.Net as a Cake Tool
#tool nuget:?package=DatatableJS.Net&version=3.0.1                

DatatableJS

Build status NuGet Codacy Badge Gitter

What is DatatableJS?

DatatableJS is a helper to create a grid with Jquery Datatable and provides an extension to retrive data generically from Entity Framework context. It possible to use many datatable.js features with Html helper. It gives serverside or client side options. There's more: Wiki Documentation

Ekran Alıntısı

Where can I get it?

Install DatatableJS for .Net Core, .Net 5, .Net 6 and use tag helpers.

PM> Install-Package DatatableJS
<datatable name="PersonGrid">
    <columns>
        <column field="Id" visible="false" />
        <column field="Name" width="50" title="Full Name" />
        <column field="Age" />
        <command-item field="Id" on-click="onClick" btn-class="btn btn-info" text="Edit" icon-class="fa fa-edit"/>
        <commands field="Id" text="Actions" items='new [] { new Command("Update", "onClick"), new Command("Delete", "onClick") }'/>
    </columns>
    <data-source url="@Url.Action("GetDataResult")" method="POST" server-side="true" data="addParam"/>
    <language url="//cdn.datatables.net/plug-ins/1.10.22/i18n/Turkish.json"/>
    <filters>
        <add field="Id" value="1" operand="GreaterThanOrEqual"/>
    </filters>
    <captions top="top caption here" bottom="bottom caption here"/>
    <render />
</datatable>

Or, Install DatatableJS.Net for .Net Frameworks (4.5 ... 4.8) from the package manager console:

PM> Install-Package DatatableJS.Net
@(Html.JS().Datatable<Person>()
        .Name("PersonGrid")
        .Columns(col =>
        {
            col.Field(a => a.Id).Visible(false);
            col.Field(a => a.Name).Title("First Name").Class("text-danger");
            col.Field(a => a.Age).Title("Age").Searchable(false);
            col.Field(a => a.BirthDate).Title("Birth Date").Format("DD-MMM-Y");
            col.Command(a => a.Id, "onClick", text: "Click").Title("");
        })
        .Filters(filter =>
        {
            filter.Add(a => a.Id).GreaterThanOrEqual(1);
        })
        .URL(Url.Action("GetDataResult"), "POST")
        .ServerSide(true)
        .Render()
)

Using .ToDataResult(request) extension function with IQueryable collection, provides data can get with server side pagination very simply. To use this feature install DatatableJS.Data from the package manager console:

PM> Install-Package DatatableJS.Data
using DatatableJS.Data

public JsonResult GetDataResult(DataRequest request)
{
    DataResult result = context.People.ToDataResult(request);
    return Json(result);
}

Then add datatables.net Javascript and CSS files or links to your project.

<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.19/css/jquery.dataTables.css">
<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.10.19/js/jquery.dataTables.js"></script>
Product Compatible and additional computed target framework versions.
.NET Framework net45 is compatible.  net451 is compatible.  net452 is compatible.  net46 is compatible.  net461 is compatible.  net462 is compatible.  net463 was computed.  net47 is compatible.  net471 is compatible.  net472 is compatible.  net48 is compatible.  net481 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
3.9.1 190 8/22/2024 3.9.1 is deprecated because it is no longer maintained.
3.9.0 142 6/28/2024 3.9.0 is deprecated because it is no longer maintained.
3.8.2 136 6/22/2024 3.8.2 is deprecated because it is no longer maintained.
3.8.1 151 3/24/2024 3.8.1 is deprecated because it is no longer maintained.
3.8.0 630 6/28/2023 3.8.0 is deprecated because it is no longer maintained.
3.7.0 185 5/3/2023 3.7.0 is deprecated because it is no longer maintained.
3.6.1 250 3/11/2023 3.6.1 is deprecated because it is no longer maintained.
3.6.0 330 1/22/2023 3.6.0 is deprecated because it is no longer maintained.
3.4.1 330 12/17/2022 3.4.1 is deprecated because it is no longer maintained.
3.4.0 324 12/8/2022 3.4.0 is deprecated because it is no longer maintained.
3.3.2 348 11/21/2022 3.3.2 is deprecated because it is no longer maintained.
3.3.1 742 10/22/2022 3.3.1 is deprecated because it is no longer maintained.
3.3.0 446 10/20/2022 3.3.0 is deprecated because it is no longer maintained.
3.2.5 418 8/5/2022 3.2.5 is deprecated because it is no longer maintained.
3.2.4 446 7/14/2022 3.2.4 is deprecated because it is no longer maintained.
3.2.3 1,322 1/16/2022 3.2.3 is deprecated because it is no longer maintained.
3.2.2 475 1/13/2022 3.2.2 is deprecated because it is no longer maintained.
3.2.0 298 1/2/2022 3.2.0 is deprecated because it is no longer maintained.
3.0.1 362 10/21/2021 3.0.1 is deprecated because it is no longer maintained.
3.0.0 398 10/10/2021 3.0.0 is deprecated because it is no longer maintained.

enabled summaries, setted serverside operation is true.