Hi RPA,
I have created a sample that full-fill your requirement.
You need to set the HtmlEncode
property to false
for the Height BoundField like below and call the databind.
HTML
<asp:GridView ID="gvDetails" runat="server" AutoGenerateColumns="False">
<Columns>
<asp:BoundField DataField="Id" HeaderText="ID" Visible="false" />
<asp:BoundField DataField="Height" HeaderText="Height" HtmlEncode="False" />
<asp:BoundField DataField="Name" HeaderText="Name" />
</Columns>
</asp:GridView>
Code
protected void Page_Load(object sender, EventArgs e)
{
DataTable dt = new DataTable();
dt.Columns.AddRange(new DataColumn[3] {new DataColumn("Id", typeof(int)),
new DataColumn("Name", typeof(string)),
new DataColumn("Height", typeof(string)) });
dt.Rows.Add(1, "Firuz", "95kg<br/>85sm<br/>45mt");
dt.Rows.Add(2, "Asror", "95kg<br/>85sm<br/>45mt");
dt.Rows.Add(3, "Sadriddin", "95kg<br/>85sm<br/>45mt");
this.gvDetails.DataSource = dt;
this.gvDetails.DataBind();
}
Screenshot
