Hello Mark,
In order to insert a link break in the header text of a GridView, we need
to disable HtmlEncode of the column. The property HtmlEncode is true by
default. Thus the symbol "<br>" in the HeaderText like "line1<br>line2"
won't serve as a line break. To resolve it, we can set HtmlEncode="false".
For example:
<asp:GridView ID="GridView1" runat="server"
AutoGenerateColumns="false">
<Columns>
<asp:BoundField HeaderText="line1<br>line2"
HtmlEncode="false" />
</Columns>
</asp:GridView>
If you have any other concerns or questions, please don't hesitate to let
me know.
Regards,
Jialiang Ge (
[email protected], remove 'online.')
Microsoft Online Community Support
=================================================
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).
This posting is provided "AS IS" with no warranties, and confers no rights.
=================================================