Click here to Skip to main content
15,944,733 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have the below text show up in a cell that i need to change just one part of the text to bold and cant figure it out. How can i modify text like a richtextbox where some text in a string is bold and the rest isnt. I need to make "Enable RDC" bold, each row has different text that gets added via xml file. the below code is how i add a row:

VB
Dim Rinfo As String = fName & "-" & fKM & vbCrLf & "" & fEmail

DataGridView1.Rows.Add(Rinfo)



Text String:
Enable RDC - dd000000
email@.com
Posted
Comments
Kenneth Haugland 24-Jul-12 15:49pm    
Im sorry I though you were programming in WPF, and if thats not the case than I must appologize. But you proberbly should do some of the same things with a textbox, that I suggested you do with a RichTextBox in WPF.

1 solution

You have to select the text you want to format. This is done through the caret position. You can see one example of it here:
http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/5c90ecbc-9728-4c59-a9ea-d2b61b07ddbc/[^]
 
Share this answer
 
Comments
Zachary.shupp 23-Jul-12 18:31pm    
I have been reading through the link and im a little lost. Is there anyway to modify that string? Could you provide an example.

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