diff --git a/GridBlazor/Pages/GridComponent.razor b/GridBlazor/Pages/GridComponent.razor
index 5816900a..f381bf04 100644
--- a/GridBlazor/Pages/GridComponent.razor
+++ b/GridBlazor/Pages/GridComponent.razor
@@ -169,16 +169,6 @@
}
}
- @if (Grid.EnablePaging && Grid.Pager.ChangePageSize)
- {
-
-
-
-
-
-
-
- }
@if (Grid.SearchingEnabled)
{
diff --git a/GridBlazor/Pages/GridComponent.razor.cs b/GridBlazor/Pages/GridComponent.razor.cs
index 179b9893..8c309071 100644
--- a/GridBlazor/Pages/GridComponent.razor.cs
+++ b/GridBlazor/Pages/GridComponent.razor.cs
@@ -31,8 +31,8 @@ public partial class GridComponent
internal bool RequiredTotalsColumn = false;
private string gridTableHead = Guid.NewGuid().ToString("N");
private string gridTableBody = Guid.NewGuid().ToString("N");
- protected string _changePageSizeUrl;
- protected int _pageSize;
+ internal string ChangePageSizeUrl;
+ internal int PageSize;
internal bool[] IsSubGridVisible;
internal bool[] InitSubGrid;
protected IQueryDictionary _filterComponents;
@@ -103,7 +103,7 @@ public partial class GridComponent
public QueryDictionary> HeaderComponents { get; private set; }
- public ElementReference PageSizeInput { get; private set; }
+ public ElementReference PageSizeInput { get; internal set; }
public GridSearchComponent SearchComponent { get; private set; }
@@ -253,8 +253,8 @@ protected override void OnParametersSet()
var queryBuilder = new CustomQueryStringBuilder(Grid.Settings.SearchSettings.Query);
var exceptQueryParameters = new List { GridPager.DefaultPageSizeQueryParameter };
- _changePageSizeUrl = queryBuilder.GetQueryStringExcept(exceptQueryParameters);
- _pageSize = Grid.Pager.ChangePageSize && Grid.Pager.QueryPageSize > 0 ? Grid.Pager.QueryPageSize : Grid.Pager.PageSize;
+ ChangePageSizeUrl = queryBuilder.GetQueryStringExcept(exceptQueryParameters);
+ PageSize = Grid.Pager.ChangePageSize && Grid.Pager.QueryPageSize > 0 ? Grid.Pager.QueryPageSize : Grid.Pager.PageSize;
_shouldRender = true;
}
@@ -1445,16 +1445,16 @@ public async Task InputPageSizeKeyup(KeyboardEventArgs e)
public async Task InputPageSizeBlur()
{
- if (_pageSize > 0)
+ if (PageSize > 0)
{
- Grid.Pager.PageSize = _pageSize;
- Grid.AddQueryParameter(GridPager.DefaultPageSizeQueryParameter, _pageSize.ToString());
+ Grid.Pager.PageSize = PageSize;
+ Grid.AddQueryParameter(GridPager.DefaultPageSizeQueryParameter, PageSize.ToString());
await UpdateGrid();
await OnPagerChanged();
}
else
{
- _pageSize = Grid.Pager.PageSize;
+ PageSize = Grid.Pager.PageSize;
_shouldRender = true;
StateHasChanged();
}
@@ -1464,7 +1464,7 @@ public async Task ChangePageSize(int pageSize)
{
if (pageSize > 0)
{
- _pageSize = pageSize;
+ PageSize = pageSize;
Grid.Pager.PageSize = pageSize;
Grid.AddQueryParameter(GridPager.DefaultPageSizeQueryParameter, pageSize.ToString());
await UpdateGrid();
diff --git a/GridBlazor/Pages/GridPagerComponent.razor b/GridBlazor/Pages/GridPagerComponent.razor
index acd7be62..5665864c 100644
--- a/GridBlazor/Pages/GridPagerComponent.razor
+++ b/GridBlazor/Pages/GridPagerComponent.razor
@@ -1,61 +1,82 @@
-@typeparam T
+@using GridBlazor.Resources
+@typeparam T
-@if (GridPager != null && GridPager.PageCount > 1)
-{
-