Click here to Skip to main content
15,912,204 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a grid view which contains several sentences. can I make one word in a sentence bold for all the cells in a grid view
Posted
Updated 7-Mar-11 20:00pm
v4
Comments
pankajupadhyay29 8-Mar-11 1:43am    
you can add on that word by using replace in your query.

1 solution

Sure, you just need to include the bold tag to the text.

The below code will set the text in the first rows of the first column to "Hello Ryan", having the word "Ryan" in bold. You just need to put <b> in front of the text you want to be bold and you must put </b> at the end of the text that you want to be bold.

GridView1.Rows[0].Cells[0].Text = "Hello <b>Ryan</b>";
 
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