All Projects → villainoustourist → Blazor.Pagination

villainoustourist / Blazor.Pagination

Licence: MIT License
A reusable pagination component for Blazor.

Programming Languages

HTML
75241 projects
C#
18002 projects
CSS
56736 projects

Projects that are alternatives of or similar to Blazor.Pagination

FlashCards
Learning Blazor By Creating A Flash Cards Application
Stars: ✭ 17 (-37.04%)
Mutual labels:  asp-net-core, blazor
BlazorServerWithDocker
Companion code sample for my blog post - Containerising a Blazor Server App
Stars: ✭ 16 (-40.74%)
Mutual labels:  asp-net-core, blazor
BlazoredLocalStorage
This library has been moved to the Blazored org
Stars: ✭ 26 (-3.7%)
Mutual labels:  asp-net-core, blazor
Jquerydatatablesserverside
Asp.Net Core Server Side for Jquery DataTables Multiple Column Filtering and Sorting with Pagination and Excel Export
Stars: ✭ 191 (+607.41%)
Mutual labels:  pagination, asp-net-core
CodeIndex
A Code Index Searching Tools Based On Lucene.Net
Stars: ✭ 28 (+3.7%)
Mutual labels:  asp-net-core, blazor
Home
Home for Blazor Extensions
Stars: ✭ 51 (+88.89%)
Mutual labels:  asp-net-core, blazor
Blazor-CRUD-With-CloudFirestore
Single Page Application (SPA) using Blazor with the help of Google Cloud Firestore as Database provider
Stars: ✭ 34 (+25.93%)
Mutual labels:  asp-net-core, blazor
Awesome Blazor
Resources for Blazor, a .NET web framework using C#/Razor and HTML that runs in the browser with WebAssembly.
Stars: ✭ 6,063 (+22355.56%)
Mutual labels:  asp-net-core, blazor
TheLastTime
C# .NET 5 Blazor WebAssembly Progressive Web Application that tracks when was the last time you did something
Stars: ✭ 23 (-14.81%)
Mutual labels:  asp-net-core, blazor
planningpoker4azure
Planning Poker 4 Azure
Stars: ✭ 49 (+81.48%)
Mutual labels:  asp-net-core, blazor
Lightquery
Lightweight solution for sorting and paging Asp.Net Core API results
Stars: ✭ 75 (+177.78%)
Mutual labels:  pagination, asp-net-core
EmbeddedBlazorContent
Library to load embedded content files (js and css) from Blazor libraries in server-side Blazor mode.
Stars: ✭ 39 (+44.44%)
Mutual labels:  asp-net-core, blazor
Dotnetpaging
Data paging with ASP.NET and ASP.NET Core
Stars: ✭ 70 (+159.26%)
Mutual labels:  pagination, asp-net-core
XAF Security E4908
This repository contains examples for Role-based Access Control, Permission Management, and OData / Web / REST API Services for Entity Framework and XPO ORM
Stars: ✭ 47 (+74.07%)
Mutual labels:  asp-net-core, blazor
X.pagedlist
Library for easily paging through any IEnumerable/IQueryable in ASP.NET/ASP.NET Core
Stars: ✭ 625 (+2214.81%)
Mutual labels:  pagination, asp-net-core
NodaTimePicker
A Date/Time picker component library for Blazor using NodaTime
Stars: ✭ 49 (+81.48%)
Mutual labels:  asp-net-core, blazor
blazor-tailwindcss-template
This template demostrates the integration of tailwindcss with blazor and covers important features like hot-reload and css isolation
Stars: ✭ 38 (+40.74%)
Mutual labels:  asp-net-core, blazor
Blazorise
Blazorise is a component library built on top of Blazor with support for CSS frameworks like Bootstrap, Bulma, AntDesign, and Material.
Stars: ✭ 2,103 (+7688.89%)
Mutual labels:  asp-net-core, blazor
SPA-With-Blazor
Creating a Single Page Application with Razor pages in Blazor using Entity Framework Core database first approach.
Stars: ✭ 27 (+0%)
Mutual labels:  asp-net-core, blazor
smart-blazor
Blazor UI Components & Examples
Stars: ✭ 32 (+18.52%)
Mutual labels:  asp-net-core, blazor

Blazor.Pagination

A reusable pagination component for .NET Core Blazor.

Build Status Package Version NuGet Downloads License

Installation

Add the BlazorPagination NuGet package to your .NET Core Blazor app using the following command in the Package Manager Console:

PM> Install-Package BlazorPagination

or using .NET CLI run the following command

dotnet add package BlazorPagination

Once you have installed the package add the following line in the _ViewImports.cshtml file

@addTagHelper *,BlazorPagination

Usage

...
@using BlazorPagination
...
<table class="table">
    <tbody>
    @foreach (var item in _data.Results)
    {
    <tr>@item</tr>
    }
    </tbody>
</table>
<BlazorPager CurrentPage="@_data.CurrentPage"
         PageCount="@_data.PageCount"
         OnPageChanged="(async e => { _page = e; await FetchData();})"

         ShowFirstLast="false"
         ShowPageNumbers="true"
         VisiblePages="10"
         FirstText="First"
         LastText="Last" />
...
@code {
    private PagedResult<string> _data;
    private string _filter;
    private int _page = 1;
    protected override OnInitialized()
    {
        _data = FetchData(_filter, _page);
    }
}

Default HTML output:

<ul class="pagination justify-content-end"> 
    <li class="page-item disabled"><a class="page-link"><span aria-hidden="true">Previous</span><span class="sr-only">Go to previous page</span></a></li>
    <li class="page-item active"><a class="page-link">1</a></li>
    <li class="page-item"><a class="page-link btn btn-link">2</a></li>
    <li class="page-item"><a class="page-link btn btn-link">3</a></li>
    <li class="page-item"><a class="page-link btn btn-link">4</a></li>
    <li class="page-item"><a class="page-link btn btn-link">5</a></li>
    <li class="page-item"><a class="page-link btn btn-link"><span aria-hidden="true">Next</span><span class="sr-only">Go to next page</span></a></li>
</ul>
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].