datagrid and leading spaces in fields

S

SKG

i have leading spaces in my database fields. When they appear in the
datagrid in browser,
they seem to be truncated. I did view source in browser and found that there
are indeed spaces but when browser
displays it crunches them in datagrid. Also i have update and delete
buttons options in this datagrid.
How can i display the leading spaces.?
TIA
 
S

S. Justin Gengo

TIA,

Spaces in browsers are always truncated. Do a replace of the spaces with
  (code for non-breaking space).

MyString.Replace(" ", " ")

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
 
R

Raterus

You'll have to replace the spaces with   in the html, you should be able to pull this off in the itemdatabound event.

text = text.Replace(" ", " ")

--Michael
 
S

SKG

Thanks All!!
You'll have to replace the spaces with   in the html, you should be
able to pull this off in the itemdatabound event.

text = text.Replace(" ", " ")

--Michael
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top