Skip to main content
Tab

GridViewTemplates.DetailRow Property

Specifies a template to display detail rows.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.1.dll

NuGet Package: DevExpress.Web

Declaration

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

Property Value

Type Default Description
ITemplate null

An object that implements the ITemplate interface.

Remarks

Set the ShowDetailRow property to true to show detail rows.

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

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

Example

In the example below, the detail row template contains additional information about an employee.

Run Demo: ASPxGridView - Detail View

DetailRow

<dx:ASPxGridView ID="ASPxGridView1" runat="server" AutoGenerateColumns="False">
    <SettingsDetail ShowDetailRow="true" />
    <Templates>
        <DetailRow>
            Region:
            <dx:ASPxLabel ID="region" runat="server" Text='<%# Eval("Region") %>' Font-Bold="true"/>
            , City:
            <dx:ASPxLabel ID="city" runat="server" Text='<%# Eval("City") %>' Font-Bold="true"/>
        </DetailRow>
    </Templates>
</dx:ASPxGridView>

Online Example

View Example: Display a custom error message in a detail row on the client

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the DetailRow property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also