Tab
A newer version of this page is available. Switch to the current version.

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.v18.2.dll

Declaration

[DefaultValue(false)]
public bool ShowEmptyDataRows { get; set; }
<DefaultValue(False)>
Public Property ShowEmptyDataRows As Boolean

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 Controls and MVC Extensions ASPxGridView
.SettingsPager.ShowEmptyDataRows
GridViewProperties
.SettingsPager.ShowEmptyDataRows
GridViewSettings
.SettingsPager.ShowEmptyDataRows
GridViewSettings<RowType>
.SettingsPager.ShowEmptyDataRows
MVCxGridView
.SettingsPager.ShowEmptyDataRows
MVCxGridViewProperties
.SettingsPager.ShowEmptyDataRows
MVCxGridViewProperties
.SettingsPager.ShowEmptyDataRows
ASP.NET Bootstrap Controls BootstrapGridView
.SettingsPager.ShowEmptyDataRows
BootstrapGridView
.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.

WebForms 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