PageSizeItemSettings.Items Property
Gets the collection of items displayed within the page size item element’s drop-down window.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v24.2.dll
NuGet Package: DevExpress.Web
#Declaration
#Property Value
Type | Description |
---|---|
String[] | An array of strings that identify the items. By default, the property contains the following values: 10, 20, 50, 100, 200 |
#Property Paths
You can access this nested property as listed below:
Object Type | Path to Items |
---|---|
ASPx |
|
Pager |
|
#Remarks
These items allow end-users to select the number of control items displayed on a page. Use the Items property to access a collection of items displayed within the page size item‘s drop-down window.
Array elements accepted by this property should be string equivalents of positive numbers separated by a comma symbol (“,”). To display the “All” button in the drop-down window, use the PageSizeItemSettings.ShowAllItem property.
The following code demonstrates how the Items property can be defined in the markup for an ASPxgridView control which uses the built-in pager.
<dx:ASPxGridView ID="ASPxGridView1" runat="server" ...>
...
<SettingsPager PageSize="10">
<PageSizeItemSettings Items="5, 10, 20" Visible="True">
</PageSizeItemSettings>
</SettingsPager>
</dx:ASPxGridView>
The image below displays the result.
At runtime, these settings can be defined as follows.
ASPxGridView1.SettingsPager.PageSize = 10;
ASPxGridView1.SettingsPager.PageSizeItemSettings.Visible = true;
ASPxGridView1.SettingsPager.PageSizeItemSettings.Items = new string[] {"5", "10", "20"};