GridViewTemplates.EmptyDataRow Property
Gets or sets a template for displaying the empty data row.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v19.2.dll
Declaration
Property Value
Type | Default | Description |
---|---|---|
ITemplate | *null* | An object that implements the ITemplate interface. |
Remarks
Note
Once a template defined via the EmptyDataRow property is created within a grid control, it is instantiated within a container object of the GridViewEmptyDataRowTemplateContainer type. This container object exposes a set of specific properties to which the template’s child controls can be bound.
Example
This example illustrates how to customize the EmptyDataRow
template. If it is necessary to only change the text displayed within EmptyDataRow, use the EmptyDataRow property.
Note
A complete sample project is available at https://github.com/DevExpress-Examples/aspxgridview-how-to-set-custom-text-displayed-within-the-emptydatarow-e3590
<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>