Display font-awsome icon in gridview search field?

Hi,

I am trying to display a fontawsome icon in the search input in a gridview as an placeholder.

I have set the placeholder to the icon code. My font is FontAwsome. However, no matter what I do or try, the gridview is displaying the icon code instead of the icon I want to see.

Has anyone tried this before and have a solution for me?

DataColumn encode options, so you cant achieve this via normal way (Of course if you dont want to overwrite Html::renderTagAttributes()).

The only way to do this is through jquery:

https://stackoverflow.com/a/34842982

Thanks for the answer.

Found a different way. I use html_entity_decode for the icon content. That way it actually works without having to do things with JS.

Please show code :)