ASPxGridViewPagerSettings.ShowEmptyDataRows Property
Gets or sets whether to show empty data rows if the number of data rows displayed within the last page fits entirely on the page.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v24.1.dll
NuGet Package: DevExpress.Web
Declaration
Property Value
Type | Default | Description |
---|---|---|
Boolean | false |
|
Property Paths
You can access this nested property as listed below:
Library | Object Type | Path to ShowEmptyDataRows |
---|---|---|
ASP.NET Web Forms Controls | ASPxGridView |
|
GridViewProperties |
|
|
ASP.NET MVC Extensions | GridViewSettings |
|
MVCxGridViewProperties |
|
Remarks
The number of rows displayed within a page is specified by the ASPxGridViewPagerSettings.PageSize property. By default, if the number of data rows displayed within the last page fits entirely on the page, the ASPxGridView is automatically resized to hide the empty space (see the image below, the ASPxGridViewPagerSettings.PageSize property is set to 8):
Set the ShowEmptyDataRows property to true
to display empty rows. In this case, the grid is not resized.
Web Forms approach:
<dx:ASPxGridView ID="GridView" runat="server">
<Columns>
...
</Columns>
<SettingsPager ShowEmptyDataRows=true PageSize="20" />
</dx:ASPxGridView>
MVC approach:
@Html.DevExpress().GridView(settings => {
settings.Name = "gridView";
...
settings.SettingsPager.PageSize = 20;
settings.ShowEmptyDataRows=true;
...
}).Bind(Model).GetHtml()