Skip to content

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

License

Notifications You must be signed in to change notification settings

nruffing/data-grid-vue-dotnet

Repository files navigation

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

Note

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

📚 Documentation

GitHub Nuget

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 DataGridVueDotnetExample 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

About

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

Resources

License

Stars

Watchers

Forks

Sponsor this project