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))) {
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. ///