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

listbox stripping whitespace

1 Answer 77 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 12 Jan 2010, 04:34 PM
  We are populating a listbox with a list of customer applications (string values):

SqlDataReader

 

a = GetCustomerApplications.ExecuteReader();

 

 

this.RadApplicationsListBox.DataSource = a;

 

 

this.RadApplicationsListBox.DataBind();

  It appears any application with multiple spaces in the string will be stripped down to a single space.

example:
  value in the database:  "Test  Aplication"
 as displayed in list box:  "Test Aplication"

Has anyone come across this?  Or any other anomalies in the rendering of values in the listbox that we need to account for?

 

1 Answer, 1 is accepted

Sort by
0
Kamen Bundev
Telerik team
answered on 13 Jan 2010, 12:54 PM
Hello David,

The issue you describe is not a problem in RadListBox but instead how web browsers render whitespace in general. Whitespace is always collapsed to one as per white-space: normal specification unless in a PRE block or if non-breaking spaces are used ( ). The easiest way to overcome that is to use item template with a pre tag in it which should allow whitespace rendering.

Greetings,
Kamen Bundev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
ListBox
Asked by
David
Top achievements
Rank 1
Answers by
Kamen Bundev
Telerik team
Share this question
or