Skip to main content
A newer version of this page is available. .
Tab

GridViewTemplates.EmptyDataRow Property

Specifies a template to display an empty data row.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v21.2.dll

NuGet Package: DevExpress.Web

Declaration

[DefaultValue(null)]
public virtual ITemplate EmptyDataRow { get; set; }

Property Value

Type Default Description
ITemplate null

An object that implements the ITemplate interface.

Remarks

When you specify the EmptyDataRow property, the control creates a template within a container object of the GridViewEmptyDataRowTemplateContainer type.

Refer to the Create Templates topic for information on how to create templates for the Grid View control’s elements.

Example

The code sample below adds an image and text to the empty data row template.

View Example: Display custom text within the Empty Data Row template

EmptyDataRow

<dx:ASPxGridView ID="ASPxGridView1" runat="server">
    <Templates>
        <EmptyDataRow>
            <dx:ASPxImage runat="server" ID="btn" ImageUrl="~/Images/Green.jpg" Width="100" />
            <div style="width: 300px;">
                No data to display...
            </div>
        </EmptyDataRow>
    </Templates>
</dx:ASPxGridView>
See Also