Click here to Skip to main content
15,891,880 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
If in any Column of List View ,if a string having more than 250 (aprox)characters is added ,then all of the charcters are not displayed, There is limit of characters which may be displayed in List View Column.
What is the solution ,if we have to show more than 250 characters in List View????
Posted
Comments
Tarun.K.S 2-Nov-10 12:08pm    
well after "googling" i found that there is a limit of 259 characters. so that means you cant have more than 259 characters! thats it! the solution can be by displaying that whole string in a separate Richtextbox on selecting that listview.

You could put an elipse at some point in the text, and when the user hovers over it, you could display the entire text as a tooltip.

HOWEVER, if you need to display that much data in a ListView cell, maybe you should re-think youre overall design.
 
Share this answer
 
actually, it's 259...from MSDN: "The text of the ListViewItem should not exceed 259 characters or unexpected behavior could occur."

I would say that trying to display that many characters in a ListView would make the ListView not the best choice of control.

Microsoft suggests that if you want to show the text for a selected item, then add a textbox to the form and when the user selects a new listviewitem, populate the textbox with the text of the column that exceeds 259 characters. Or, you can use a tooltip...that's a pretty simple solution.

Or use a custom listview that someone else has created such as: http://www.codeproject.com/KB/list/aa_listview.asp[^]
 
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