Click here to Skip to main content
15,892,674 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
can anyone help me .
i have one dropdown list on which i have some very big text to show.
so my text is not displaying in dropdowm completly so how can i break text in two line.

Thanks in advance
Posted

try code in the article:

Extended DropDownList[^]
 
Share this answer
 
Comments
kapil0411 7-Dec-11 6:00am    
Thanks saichandra but i have very large data so i cant use this method.
the only way is break the data in multiple lines.
Hi,

What you can try is to find out how much characters you can show, then from that position in the string look back to find a white space. Replace that white space by a '\n' and you should have something that displays on two lines (if the displaying item supports multi line.

Another alternative is to stop the line on the max lenght and make it end on an ellipses (...). then show the full line (possibly split again over multiple lines) in a context help baloon.

Hope this helps; AT
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900