Skip to main content
Tab

GridViewTemplates.EmptyDataRow Property

Specifies a template to display an empty data row.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.1.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.

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>

If it is necessary to only change the text displayed in empty data row, use the EmptyDataRow property.

See Also