You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: How to create new lines inside a Grid column.
4
+
type: how-to
5
+
page_title: Render Line Breaks in Grid Column
6
+
slug: grid-kb-line-breaks
7
+
position:
8
+
tags:
9
+
ticketid: 1650530
10
+
res_type: kb
11
+
---
12
+
13
+
## Environment
14
+
<table>
15
+
<tbody>
16
+
<tr>
17
+
<td>Product</td>
18
+
<td>Grid for Blazor</td>
19
+
</tr>
20
+
</tbody>
21
+
</table>
22
+
23
+
## Description
24
+
25
+
This knowledge base article answers the following questions:
26
+
27
+
* How do I display line breaks inside a Grid column?
28
+
* Is it possible to render HTML inside a Grid column?
29
+
30
+
## Solution
31
+
32
+
1. To create a new line break in the HTML content of a Grid cell, replace the `\n` segment with the `<br>` HTML tag.
33
+
2. To render the `<br>` HTML tag from a string, use a <ahref="https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.components.markupstring?view=aspnetcore-8.0"target="_blank"><code>MarkupString<code></a>.
34
+
3. To define the `MarkupString`, use the column's `Template`.
0 commit comments