Skip to main content
Tab

GridViewTemplates.PreviewRow Property

Specifies a template to display preview rows.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.1.dll

NuGet Package: DevExpress.Web

Declaration

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

Property Value

Type Default Description
ITemplate null

An object that implements the ITemplate interface.

Remarks

Set the ShowPreview property to true to show preview rows.

ASPxGridView.Templates - PreviewRow

<dx:ASPxGridView ID="grid" runat="server" AutoGenerateColumns="false">
    <Settings ShowPreview="true" />
    <Templates>
        <PreviewRow>
            <table>
                <tr>
                    <td style="padding-right: 12px">
                        <dx:ASPxBinaryImage ID="ASPxBinaryImage1" runat="server"
                            Value='<%# Eval("Photo") %>' />
                    </td>
                    <td style="vertical-align: top">
                        <dx:ASPxLabel ID="lblNotes" runat="server" Text='<%# Eval("Notes") %>' />
                    </td>
                </tr>
            </table>
        </PreviewRow>
    </Templates>
</dx:ASPxGridView>

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

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

See Also