Can someone please explain how the following the following is achieved. The Telerik Grid component will generate non-encoded HTML with the following code:
@(Html.Telerik().Grid(Model)
.Name("Grid")
.DataKeys(keys => keys.Add(c => c.ProductID))
.DataBinding(dataBinding => dataBinding.Server()
.Select("ColumnSettings", "Grid")
.Update("ColumnSettings_Save", "Grid")
.Delete("ColumnSettings_Delete", "Grid"))
.Columns(columns =>columns.LoadSettings((IEnumerable<GridColumnSettings>)ViewData["Columns"]))
.Sortable()
)
Presumably this happens because the method call is wrapped in "@(....)". Whenever I try this with my own components the result is encoded Html. I know that I can use Render() to output an MvcHtmlString and then my Html is not encoded but the Telerik grid seems to achieve it without .Render().
Can anyone explain the secret to me?