Click here to Skip to main content
15,905,008 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

I have a grid view cell with some words separated by ",".
here i want new line in grid view cell for every 10 words.

Thanks in advance
Venkatesh
Posted

1 solution

You can use Replace function to do the same.
Try this:
HTML
<itemtemplate>
        <%# ((string)Eval("Details")).Replace(",", "<br />") %>
</itemtemplate>


--Amit
 
Share this answer
 
Comments
narla.venkatesh 27-Mar-13 5:34am    
not for each word, after every 10 words
_Amy 27-Mar-13 5:35am    
Do you mean after 10 rows or after 10 words in details column?
narla.venkatesh 27-Mar-13 5:37am    
after 10 words which are separated by ','
_Amy 27-Mar-13 5:41am    
What's your question? What do you need to do? Can you describe clearly?
narla.venkatesh 27-Mar-13 5:45am    
in one of my grid view cell i have some words like this
sss,ghgh,ojm,hhih,hjhjh,hjhjh
after 10 words i need new line in the same cell of the gridview.

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