We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Render Raw HTML

Thread ID:

Created:

Updated:

Platform:

Replies:

149739 Dec 7,2019 09:19 AM UTC Dec 9,2019 09:08 AM UTC Blazor 2
loading
Tags: Grid
Ben Nl
Asked On December 7, 2019 09:20 AM UTC

Trying to figure out how I can get one of my columns in a datagrid to render as raw html. Usually I'd just use
@((MarkupString)myMarkup)
but I can't see an equivalent in GridColumn methods/properties.

Thanks

Ben Nl
Replied On December 7, 2019 02:21 PM UTC

Figured out you are meant to use a template, e.g.

<GridColumn Field=@nameof(JobListing.Description) HeaderText="Description" Width="250">
       <Template>
                    @{
                        var job = (context as JobListing);
                        <span>@((MarkupString)job.Description)</span>
                    }
     </Template>
</GridColumn>

Vignesh Natarajan [Syncfusion]
Replied On December 9, 2019 09:08 AM UTC

Hi Ben,  

Thanks for using Syncfusion products.  

Query: “Figured out you are meant to use a template, e.g.” 
 
We are glad to hear that you have resolved your query on your own. You can also achieve your requirement using DisableHtmlEncode property of GridColumn. Refer our UG documentation for your reference. 


Please get back to us if you have further queries.  

Regards, 
Vignesh Natarajan. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon