RazorKit.DataTables
1.0.4
dotnet add package RazorKit.DataTables --version 1.0.4
NuGet\Install-Package RazorKit.DataTables -Version 1.0.4
<PackageReference Include="RazorKit.DataTables" Version="1.0.4" />
paket add RazorKit.DataTables --version 1.0.4
#r "nuget: RazorKit.DataTables, 1.0.4"
// Install RazorKit.DataTables as a Cake Addin #addin nuget:?package=RazorKit.DataTables&version=1.0.4 // Install RazorKit.DataTables as a Cake Tool #tool nuget:?package=RazorKit.DataTables&version=1.0.4
Welcome to RazorKit
RazorKit is a collection of lightweight, fluent-style Razor HTML helpers that make it easy for developers to integrate popular JavaScript libraries into their ASP.NET applications. With RazorKit, you can quickly implement features from libraries like Chart.js and DataTables, without the hassle of writing complex JavaScript or HTML code manually.
Setup DataTables
Install the RazorKit.DataTables package from nuget.
PM> Install-Package RazorKit.DataTables
Add related scripts and style links and implement. Reference:
@using RazorKit
@(Html.DataTable<Person>()
.Columns(c =>
{
c.Field(f => f.Id).Visible(false);
c.Field(f => f.Name).Title("Name");
})
.DataSource(ds => ds
.URL(Url.Action("GetDataResult"))
.Method("POST")
.Naming(Convention.CamelCase))
.ServerSide(true)
.Render()
)
using RazorKit.DataTables;
[HttpPost]
public JsonResult GetDataResult(DataRequest request)
{
var result = ctx.People.ToDataResult(request);
return Json(result);
}
Setup ChartJs
Install the RazorKit.ChartJs package from nuget.
PM> Install-Package RazorKit.ChartJs
Add related scripts and implement. Reference:
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
@using RazorKit
@(Html.Chart("canvasId")
.Data(d => d
.Labels("January", "February", "March", "April", "May", "June", "July")
.Datasets(ds => ds
.Line()
.Label("Line Chart")
.Data(65, 59, 80, 81, 56, 55, 40)
)
)
.Render()
)
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp3.1 is compatible. |
.NET Framework | net471 is compatible. net472 is compatible. net48 is compatible. net481 is compatible. |
-
.NETCoreApp 3.1
- Microsoft.AspNetCore.Mvc (>= 2.1.3)
- Newtonsoft.Json (>= 13.0.1)
- System.ComponentModel.Annotations (>= 4.5.0)
-
.NETFramework 4.7.1
- Microsoft.AspNet.Mvc (>= 5.3.0)
- Newtonsoft.Json (>= 13.0.1)
- System.ComponentModel.Annotations (>= 4.0.0)
-
.NETFramework 4.7.2
- Microsoft.AspNet.Mvc (>= 5.3.0)
- Newtonsoft.Json (>= 13.0.1)
- System.ComponentModel.Annotations (>= 4.0.0)
-
.NETFramework 4.8
- Microsoft.AspNet.Mvc (>= 5.3.0)
- Newtonsoft.Json (>= 13.0.1)
- System.ComponentModel.Annotations (>= 4.0.0)
-
.NETFramework 4.8.1
- Microsoft.AspNet.Mvc (>= 5.3.0)
- Newtonsoft.Json (>= 13.0.1)
- System.ComponentModel.Annotations (>= 4.0.0)
-
net6.0
- Microsoft.AspNetCore.Mvc (>= 2.1.3)
- Newtonsoft.Json (>= 13.0.1)
- System.ComponentModel.Annotations (>= 4.5.0)
-
net7.0
- Microsoft.AspNetCore.Mvc (>= 2.1.3)
- Newtonsoft.Json (>= 13.0.1)
- System.ComponentModel.Annotations (>= 4.5.0)
-
net8.0
- Microsoft.AspNetCore.Mvc (>= 2.1.3)
- Newtonsoft.Json (>= 13.0.1)
- System.ComponentModel.Annotations (>= 4.5.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Improved layout builder.