Reset raw html to Telerik grid

I have an MVC3 application that uses a Telerik grid. I have a variable with html in it, I want to display raw:

o.RawHtml = "This is a <br/> Test"; @(Html.Telerik().Grid(Model) .Columns(columns => { columns.Bound(o => o.RawHtml).ClientTemplate("<#= RawHtml #>").Title("Raw"); }) 

According to Telerik samples, this should work, but it is not. The output in the browser shows "This is a test" lt; br / ">"

not desired:

  This is a Test 

Any ideas? Thanks

+7
source share
1 answer

Have you tried setting the Encoded column property to false ? This page gives some information.

 <%= Html.Telerik().Grid(Model) .Name("Orders") .Columns(columns => { columns.Bound(o => o.OrderID).Encoded(false); }) %> 

By default, columns are html encoded.

+20
source

All Articles