Hello,
I want to display HTML text in a grid view, with the formatting and have reviewed the documentation. I have seen that you can use a RichTextEdit and set the documentFormat property to HTML. I can get bold text to show, using strong, but I cannot get the font color to change. I have read the documentation and have tried all the different types but to no avail, what am i doing wrong.
Examples tried :
<strong><color=255,0,0>Bold and Colour Red</color></strong> Plain Text
and
<strong><color=blue>Bold and Colour Blue</color></strong> Plain Text
and in this case when introducing the word font, nothing appears at all
<strong><Font color=255,0,0>Bold and Colour Red</color></strong> Plain Text
Have also tried using a hex code based on advise in the forums but still to no avail.
What am i missing?
Thanks in advance
Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Hi Frank,
Thank you for your message.
Please use approach described in the How to: Change Formatting of Selected Text article to change the color of the text.
Thanks,
Elliot
Sorry I think there has been a misunderstanding of what I am trying to achieve. This is all based within a gridview control and using a richtextedit control on one of the columns (description) which is also set to HTML compatibility.
My text is HTML based for other purposes, but i want the grid to interpret it and display the HTMLs look and feel. According to the help files using the richtextedit with the html setting should do this, and it does when you use strong but does not when using color.
Only certain words will have a different colour, or bolding and i simply want to have the datasource bound to the grid and have each description field display correctly
Are you able to offer any other advice?
Hello Frank,
Thank you very much for the clarification. I completely understand your scenario. Basically, there is no "color" tag in the standard HTML specification. You should use the font tag with the color attribute for this purpose: HTML <font> Tag. Thus, you might need to update your example as follows: "<strong><font color='#FF0000'>Bold and Colour Red</font></strong> Plain Text". Attached is a sample, demonstrating how this works in the RichEditControl. As for the "color" tag, it is our own invention that is used in the HTML Text Formatting. If any part of my response is unclear, please let me know. I will be glad to help you.
Thanks,
Alessandro.
I had tried that but it is still not working. I have created a small example app and it is attached. I have created a dummy table for this example, but my data will normally come straight from the database.
Hopefully from the attached you can see the issue I am having
Hello Frank,
Thank you for your sample. Here are my comments:
Thanks,
Alessandro.