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.
Unfortunately, activation email could not send to your email. Please try again.

RichText Cells not refreshing correctly

Thread ID:

Created:

Updated:

Platform:

Replies:

17583 Aug 12,2004 08:55 AM Aug 13,2004 06:50 AM Windows Forms 2
loading
Tags: GridControl
Paul N
Asked On August 12, 2004 08:55 AM

Hi I have a grid with three columns. Col1 type=Checkbox, Col2 and Col3=RichText. The problem I have is that when I make the data of any particular cell bold and a different size for example, and then use the mouse to navigate up and down the grid, surrounding cells seem to inherit the style of the previous RTF cell, and then revert to their correct style. So for example, C1:R1="Hello" (in size 15 and bold), C1:R2="Hello" without any formatting, but when I scroll, C1:R2 text will take on the format of C1:R1. Is there any kind of way of locking-in the format so that this kind of error does not occur? Many thanks Error3_6508.zip

Administrator [Syncfusion]
Replied On August 12, 2004 10:52 AM

Is this a GridDataBoundGrid? If so, what are you storing in your DataSource? It would have to be actual RTF text (a string including the rtf formatting information, and not just a string containing the raw text). Here is a thread that works through this problem (among others). http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=12809

Paul N
Replied On August 13, 2004 06:50 AM

Aha! Thanks. Answer lies in just setting the text value of the control rather than the underlying rtf value. On my populate routine, I''ve added an extra check for RTF controls and made use of a RichTextBox control as you suggested to derive RTF values for the grid element itself. Dim objRTF as New RichTextBox If i_objSyncGrid(intRowLoop + 1, intFieldRef).CellType = "RichText" Then objRTF.Text = vbNullString objRTF.SelectedText = strDisplayValue i_objSyncGrid(intRowLoop + 1, intFieldRef).CellValue = objRTF.Rtf Else i_objSyncGrid(intRowLoop + 1, intFieldRef).Text = strDisplayValue End If Thanks again for you guidance Paul >Is this a GridDataBoundGrid? If so, what are you storing in your DataSource? It would have to be actual RTF text (a string including the rtf formatting information, and not just a string containing the raw text). Here is a thread that works through this problem (among others). > >http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=12809

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;