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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Form Questions /

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

HowTo display a virtual column inside a GridField unescaped?


Go to End


2 Posts   1377 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.