DataRowInfo<T> Struct

Provides information about a data row.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.dll

Declaration

public struct DataRowInfo<T>

Type Parameters

Name Description
T

The type of the data item that corresponds to the data row.

Remarks

The DataRowInfo object is used as the Context parameter of the Data Grid's RowPreviewTemplate. This template allows you to show preview sections under each data row across all columns.

The following example demonstrates how to display preview sections with employee images and multi-line notes.

<DxDataGrid Data="@DataSource">
    <Columns>
        <DxDataGridColumn Field="@nameof(Employee.FirstName)" SortOrder="DataGridColumnSortOrder.Ascending"></DxDataGridColumn>
        <DxDataGridColumn Field="@nameof(Employee.LastName)"></DxDataGridColumn>
        <DxDataGridColumn Field="@nameof(Employee.Position)" Caption="Position" EditorVisible="DefaultBoolean.True"></DxDataGridColumn>
        <DxDataGridDateEditColumn Field="@nameof(Employee.BirthDate)" DisplayFormat="D" EditorFormat="d" 
              Caption="Birth Date" EditorVisible="DefaultBoolean.True"></DxDataGridDateEditColumn>
        <DxDataGridDateEditColumn Field="@nameof(Employee.HireDate)" DisplayFormat="D" EditorFormat="d" 
              Caption="Hire Date" EditorVisible="DefaultBoolean.True"></DxDataGridDateEditColumn>
    </Columns>
    <RowPreviewTemplate Context="ItemInfo">
        @{
            Employee employee = ItemInfo.DataItem;
            <table cellpadding="5" cellspacing="0">
                <tbody>
                    <tr>
                        <td rowspan="4" style="border: 0px;">
                            <img src="images/Employees/@(employee.FileName).png" width="76" />
                        </td>
                        <td style="border: 0px; white-space: normal;">
                            @employee.Notes
                        </td>
                    </tr>
                </tbody>
            </table>
        }
    </RowPreviewTemplate>
</DxDataGrid>

Data Grid Row Preview Template

Online Demo

See Also