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

dynamic radgrid header name produce odd change of line

2 Answers 103 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Louis-Philippe
Top achievements
Rank 1
Louis-Philippe asked on 24 Jan 2011, 10:06 PM
Hello,
I'm creating dynamic radgrid with dynamic columns names. The names all come from the database and can be either in English or in French. When a column's name contain a french character such as é à è ê ç... or if it contain ' or - a space is automatically added after the character witch odd result such as:
"Remplaç
ant"
or
"Anné
e"
or
"sous
-
code"
I tried to prevent text wraping this way:
grid.HeaderStyle.Wrap = false;
This way I don't get odd wrapping, but I still get space after those character, so it now looks like:
"Remplaç ant"
"Anné e"
"sous- code"
It's a little bit better but far from acceptable. The data binding is done this way (table been a DataTable):
grid.DataSource = table;
I tried to use Server.HtmlEncode() to make sure that the string is in the right format, but no luck... Since I'm using a DataTable, I don't think I can use TextBlock.  Any idea?

Thanks,
LP

2 Answers, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 27 Jan 2011, 12:15 PM
Hello Louis-Philippe,

Can you please try adding the header text in <nobr></nobr> tag and see if this works?

Kind regards,
Iana
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Marco
Top achievements
Rank 1
answered on 07 Feb 2011, 06:00 PM
Hello,

Experiencing the same problem after the last update, but with capital characters in a column name.
i.e. when i create a column with the name 'NameOfColumn', the column name is going to be 'Name Of Column'.

Totaly unwanted for exporting fields, and happend after the last update.

edit:
I have noticed that this is solved with the latest build/version for the RadControls (2010.3 1317 (Jan 17, 2011)).
After testing this is the case, but it is a rare implementation to have the possibilty that Column names are automaticly changed.



Tags
Grid
Asked by
Louis-Philippe
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Marco
Top achievements
Rank 1
Share this question
or