GRIDVIEW: formatting headertext

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a BoundField, and I need to split the HeaderText onto >1 line. Is
that possible? An embedded <BR> is just added as text.
Thanks
 
I have a BoundField, and I need to split the HeaderText onto >1 line. Is
that possible? An embedded <BR> is just added as text.
Thanks

You need to set HtmlEncode like this:

<asp:BoundField DataField="CreationDate" HtmlEncode="false"
HeaderText="Creation <br/> Date" ReadOnly="True"
SortExpression="CreationDate" />

I wrote a post about something similar for more info:

http://peterkellner.net/?p=36
Peter Kellner
http://peterkellner.net
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top