How do I break the a BoundField's HeaderText

前端 未结 2 1902
半阙折子戏
半阙折子戏 2021-01-01 17:10

In HTML in the td of a table you can break text by using
between the words. This also works in the HeaderText of a TemplateItem but not the HeaderTex

2条回答
  •  再見小時候
    2021-01-01 18:15

    Set HtmlEncode = false inside the BoundField

     
    

    BoundField.HtmlEncode is true by default which means that if HTML is added in the text it will be encoded.
    If HtmlEncode is set to false the text is not encoded and the br will work as expected. Unfortunately is not possible to specify this only for the header text, it will affect the cell contents as well.

提交回复
热议问题