Skip to main content
Tab

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

[DefaultValue(false)]
public bool ShowEmptyDataRows { get; set; }

Property Value

Type Default Description
Boolean false

true to show empty data rows; otherwise, false.

Property Paths

You can access this nested property as listed below:

Library Object Type Path to ShowEmptyDataRows
ASP.NET Web Forms Controls ASPxGridView
.SettingsPager .ShowEmptyDataRows
GridViewProperties
.SettingsPager .ShowEmptyDataRows
ASP.NET MVC Extensions GridViewSettings
.SettingsPager .ShowEmptyDataRows
MVCxGridViewProperties
.SettingsPager .ShowEmptyDataRows

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):

ASPxGridView_ShowEmptyRows_False

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()

ASPxGridView_ShowEmptyRows_True

See Also