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
close icon

Coloring text in one cell with different colors

This question was initially asked in the General forum, but my guess is that I will get a faster response in this forum. Can this be accomplished in the GridBoundDataGrid control? By Rasik at 11/26/2003 8:53:56 PM Dear Syncfusion Team, Do your product give us the facility to color the text of one cell of the grid with different colors.E.g: Say text in one cell is "Hello World". Can we color Hello in Red and World in Blue. If Yes, how can we do it? If no,do you any other product which will solve our purpose? Regards, Rasik By Daniel Jebaraj at 12/1/2003 6:36:51 AM Hi Rasik, Sure, you can do that with the Rich Text cell type. Also, take a look at the xhtml sample. It allows for simple formatting to be applied to the Rich Text cell using xhtml instead of RTF. Best regards, Daniel

1 Reply

AD Administrator Syncfusion Team February 2, 2004 11:30 PM UTC

Currently, you would have to use richtext celltyle as Daniel suggested. Here is a link to a sample shipped with the product that shows how you would do this. \Syncfusion\Essential Suite\Grid\Samples\CellTypes\RichTextCells But, using this in a GridDataBoundGrid where teh cell text comes from your database would require some work unless your database holds the information as rich text to begin with. If your database does not hold richtext, then you would have to handle teh Model.QueryCellInfo event. In that event, you could dynamically switch the celltype to RichText and then color the text the way you want it using richtext techniques.

Loader.
Live Chat Icon For mobile
Up arrow icon