Default RichTextBox text color

Good day,

I have a situation in which I have a gridcontrol column of richtext cells. I have customized the richtext editor which works great to modify the settings of the text, such as the text color. However, the default color when a cell is first filled out is always black, which does not work well given the dark background color of my gridcontrol. I have not been able to find a way to modify the default textcolor for richtextbox cells. Is this a possibility?

Thanks.

3 Replies 1 reply marked as answer

BT Balamurugan Thirumalaikumar Syncfusion Team June 16, 2021 03:54 AM UTC

Hi Travis,  
  
Thank you for your interesting in Syncfusion products.  
 
We have checked your query “Change Default RichTextBox text color” at our end. In order to change the RichTextBox textcolor, you can use the TextColor property which allows you to change the RichTextBox textcolor. You can refer the following code snippet for your reference. 
 
Code Snippet 
//adding custom rich text cell to the grid 
this.gridControl1.CellModels["RichTextCell"] = new CustomRichTextCell(this.gridControl1.Model); 
this.gridControl1.ColStyles[3].CellType = "RichTextCell"; 
this.gridControl1.ColStyles[3].CellValue = "This is the RichTectboxCell which resizes the height based on text"; 
this.gridControl1.ColStyles[3].TextColor = Color.Blue; 
 
 
Please let us know if you would require any other assistance. we will be happy to assist you. 
  
Regards,   
Balamurugan.Thirumalaikumar 


Marked as answer

TC Travis Chambers June 16, 2021 04:15 PM UTC

Thank you for your response. I had been trying to use the "TextColor" property but it was not working. I think I figured it out though. I was not using the "RichText" cell type, but instead using a custom richttext class so that I could modify the editor. I just needed to edit the textcolor in the "RichTextBoxCellRenderer" method of the custom class and now it seems to be working.

Thanks!


BT Balamurugan Thirumalaikumar Syncfusion Team June 17, 2021 07:35 AM UTC

Hi Travis, 

Thank you for the update. 

We are glad to know that the provided solution is resolved the issue. Please let us know if you would require any other assistance. we will be happy to assist you. 

Balamurugan Thirumalaikumar  



Loader.
Up arrow icon