Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Form Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

HowTo display a virtual column inside a GridField unescaped?


Go to End


2 Posts   1983 Views

Avatar
wee-man

Community Member, 21 Posts

3 March 2013 at 9:52am

Hallo,
I have a DataObject with a virtual column (getPathsAsString()). The return value of this does contain HTML code. When this column is displayed in a GridField, the HTML code will be escaped. Does anyone know how to make the GridField not to escape that column?

I've already tried to set a casting to HTMLText for that field. But that doesn't make any difference.

Thanks

Avatar
copernican

Community Member, 189 Posts

8 May 2014 at 2:39am

Anybody looking for help on this subject check out this article http://www.silverstripe-webdevelopment.com/tricks/showing-html-in-gridfields/. Worked for me.