This is a migrated thread and some comments may be shown as answers.

Header text is not displaying correctly

1 Answer 39 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jud
Top achievements
Rank 1
Jud asked on 12 Jun 2015, 12:31 PM
We have a column in a Grid whose text is 'a&b' at html but on browser it is displaying as 'a'. When I edit that text to 'a & b' with single space before and after & then it is displaying correctly i.e 'a & b'. This is our client requirement to display the text on header as 'a&b'. Is there any possibility to allow that text to display in a grid header?

1 Answer, 1 is accepted

Sort by
0
Kostadin
Telerik team
answered on 17 Jun 2015, 07:48 AM
Hello Jud,

The cause for not encoding the & correctly is that the Literal control calls HtmlDecode internal when you apply a text and we use this control in the header cells. You can examine the following help article which elaborates more on this matter. Nevertheless if you want to display the text which you have provided in the header cell you can use the following approach.
Copy Code
HeaderText="AP#3&#4"

Regards,
Kostadin
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Grid
Asked by
Jud
Top achievements
Rank 1
Answers by
Kostadin
Telerik team
Share this question
or