We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

RichText format keeps resetting

I''m using a griddataboundgrid control with rich text in a couple of the columns (because I like the dropdown feature). I would like the text in these cells to always come up as Courier New font in order to keep the text aligned the way I want. However, every time I examime one of the rich text cells in the griddataboundgrid, the format reverts to MS Sans Serif font. I''ve tried: - Populating the MS Access database with Courier New string data - formatting the grid columns to be Courier New font type - formating the entire griddataboundgrid to be Courier New font type - formatting my entire MS Access database to be Courier New font type - dynamically formatting the columns (mousedown event on grid) to Courier New font In all cases, the columns revert to Sans Serif. Is there a way to keep these rich text cells from reverting back to Sans Serif font? Thanks.

1 Reply

AD Administrator Syncfusion Team February 4, 2004 08:21 PM UTC

The font used in richtext is stored in the rtf formatted string. So, if you want to set the font, you would need to modify the rtf string. One way you can do that is to create a RichTextBox control, and then use it to format the rtf strings. Here is a little sample.

Live Chat Icon For mobile
Up arrow icon