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

RichTextBox in cell does not show text

When I place a RichtTextBox control in the grid, I can not see the text in the control unless I have that cell selected. Is there a way to ensure that the text is always visible. I do not have this problem with other controls. Thanks for the help.

3 Replies

AD Administrator Syncfusion Team October 19, 2004 02:29 PM UTC

Can you post a sample project showing the problem? I added this code below in a FormLoad event for a form holding a grid, and teh text showed up for me. this.gridControl1[1,1].CellType = "RichText"; this.gridControl1[1,1].Text = "asdsad"; I also tried setting a column of TichText cells in a GridDataBoundGrid, and that seemed to work as wewll. I am using

CM Colin Marsh October 19, 2004 05:50 PM UTC

You are using the RichText feature of the grid. I am using a custom control which uses a RichTextBox control. Therefore you have to use the .Control property of the cell. i.e. this.gridControl1[1,1].Control = new RichTextBox(); this.gridControl1[1,1].Style = "Control"

AD Administrator Syncfusion Team October 19, 2004 06:54 PM UTC

The Control CellType tries to draw the nonfocused cell by drawing the control off the display (maybe at -1000,-1000) to a bitmap, and then display the bitmap of the control in the cell. This technique is not working for an RichTextBox control. If you change the RichTextBox with a TextBox, then the problem goes away. If you want to embed a RichTextBox in a cell, you will probably have better luck using a derived cell type. Here is a KB article that has code. http://www.syncfusion.com/Support/article.aspx?id=10495

Live Chat Icon For mobile
Up arrow icon