This is a migrated thread and some comments may be shown as answers.

[Solved] Grid Bound Column format is getting html encoded. any way around?

1 Answer 36 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Stephen Hebert
Top achievements
Rank 1
Stephen Hebert asked on 18 May 2010, 10:12 PM
I am trying to insert a link into my grid like so:

columns.Bound(c => c.DocumentId).Format(%><%
                                                                                 Html.ActionLink(
                                                                                     MyStringTable.Publish, "Publish",
                                                                                     new RouteValueDictionary
                                                                                         {{"id", "{0}"}}).ToString()%><%);

When Rendered the column looks like this:

<a href="/Contract/Publish/13">Publish</a>

Instead of:

_Publish_

(beginining and ending underscores denote a link behavior)

Any thoughts on this?


1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 19 May 2010, 07:24 AM
Hi Stephen Hebert,

By default the content is indeed HTML encoded for security reasons. Use Encoded(false) to do the opposite:

columns.Bound(c => c.DocumentId).Format(Html.ActionLink(MyStringTable.Publish, "Publish",new RouteValueDictionary{{"id", "{0}"}}).ToString()).Encoded(false);

Regards,
Atanas Korchev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Grid
Asked by
Stephen Hebert
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or