Data Grid Vue dotnet

GitHub Sponsors

dotnet models and IQueryable extensions for handling server-side paging, sorting, filtering, and saving grid state for data-grid-vue

DataGridVueDotnet currently targets .NET 6 and probably will until support ends in November 2024open in new window.

Documentation

GitHubNuget

Installation

dotnet add package DataGridVueDotnet

Example

[HttpPost]
public async Task<ActionResult<PageData<TestDataItem>>> Post(PageDataRequest request)
{
    if (request is null || !request.IsValid)
    {
        return BadRequest();
    }

    var query = _context.TestDataItems.AsQueryable();
    var dataItems = await query
        .ApplyPageDataRequest(request)
        .ToArrayAsync();
    var count = await query
		.Filter(request)
		.CountAsync();

    return Ok(new PageData<TestDataItem>()
    {
        DataItems = dataItems,
        TotalItems = count
    });
}

A full example with an ASP.NET API and EF Core context can be seen in the DataGridVueDotnetExampleopen in new window folder.

Release Notes

v1.2.0

  • Add grid identifier to storage request models

v1.1.0

  • Include symbols

v1.0.0

  • Add models for server-side storage
  • Add documentation comments
  • Update readme

v0.0.1-alpha

  • initial release