GridDataColumnCellDisplayTemplateContext.HighlightedDisplayText Property
Returns a formatted fragment that contains the cell’s display text with highlighted search matches.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.Grid.v26.1.dll
Declaration
public RenderFragment HighlightedDisplayText { get; }
Property Value
| Type | Description |
|---|---|
| RenderFragment | A delegate that returns the highlighted display text. |
Remarks
The HighlightedDisplayText property is in effect if you use the search box within the Grid component.
If you use a cell template, you can obtain cell display text from the DisplayText property. If you allow search and filter operations, use the HighlightedDisplayText property instead. This property returns a formatted fragment that contains the same display text with highlighted search matches.
<DxGrid Data="DataSource" ShowSearchBox="true">
<Columns>
<DxGridDataColumn FieldName="LastName" >
<CellDisplayTemplate>
@{
var item = (Employee)context.DataItem;
<text>@item.TitleOfCourtesy @context.HighlightedDisplayText</text>
}
</CellDisplayTemplate>
</DxGridDataColumn>
<DxGridDataColumn FieldName="Title"/>
<DxGridDataColumn FieldName="BirthDate" />
</Columns>
</DxGrid>

For additional information about search in the Grid component, refer to the following topic: Search Box in Blazor Grid.