From e9879a0cf771c5885e74f9492e000157360e6280 Mon Sep 17 00:00:00 2001 From: RobertRioja-Alpa Date: Thu, 12 Mar 2026 11:59:19 -0400 Subject: [PATCH 1/2] Added PlacePaginationBeforeGrid option to Grid --- blazorbootstrap/Components/Grid/Grid.razor.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/blazorbootstrap/Components/Grid/Grid.razor.cs b/blazorbootstrap/Components/Grid/Grid.razor.cs index 63b3b6cbf..fc346fbce 100644 --- a/blazorbootstrap/Components/Grid/Grid.razor.cs +++ b/blazorbootstrap/Components/Grid/Grid.razor.cs @@ -766,6 +766,18 @@ private void SetFilters(IEnumerable filterItems) [Parameter] public bool AutoHidePaging { get; set; } + /// + /// Moves pagination from below the grid to above the grid. + /// + /// Default value is . + /// + /// + [AddedVersion("")] + [DefaultValue(false)] + [Description("Moves pagination from below the grid to above the grid.")] + [Parameter] + public bool PlacePaginationBeforeGrid { get; set; } + /// /// Gets or sets the content to be rendered within the component. /// From d8fcda4af918164d995c5db508c259d1cd762076 Mon Sep 17 00:00:00 2001 From: RobertRioja-Alpa Date: Thu, 12 Mar 2026 12:09:07 -0400 Subject: [PATCH 2/2] Update Grid to support placing Pagination above Grid --- blazorbootstrap/Components/Grid/Grid.razor | 38 +++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/blazorbootstrap/Components/Grid/Grid.razor b/blazorbootstrap/Components/Grid/Grid.razor index 61b311dc6..c2ace8a7a 100644 --- a/blazorbootstrap/Components/Grid/Grid.razor +++ b/blazorbootstrap/Components/Grid/Grid.razor @@ -8,6 +8,42 @@ @if (columns.Any()) { + @if (PlacePaginationBeforeGrid && AllowPaging && totalCount.HasValue && totalCount.Value > 0 && (!AutoHidePaging || (AutoHidePaging && totalCount.Value > pageSize))) + { +
+ + + @if (PageSizeSelectorVisible && PageSizeSelectorItems is not null && PageSizeSelectorItems.Any()) + { +
+
+
+ + @foreach (var i in PageSizeSelectorItems) + { + + } + +
+
@ItemsPerPageText
+
+
+ } + +
+ @paginationItemsText +
+
+ } + var columnCount = columns.Where(c => c.IsVisible).Count(); if (AllowSelection) columnCount += 1; if (AllowDetailView) columnCount += 1; @@ -222,7 +258,7 @@ - @if (AllowPaging && totalCount.HasValue && totalCount.Value > 0 && (!AutoHidePaging || (AutoHidePaging && totalCount.Value > pageSize))) + @if (AllowPaging && totalCount.HasValue && totalCount.Value > 0 && !PlacePaginationBeforeGrid && (!AutoHidePaging || (AutoHidePaging && totalCount.Value > pageSize))) {