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.

REGD--Find-Replace Dialog

Thread ID:

Created:

Updated:

Platform:

Replies:

26833 Apr 1,2005 04:36 AM Apr 4,2005 01:43 PM Windows Forms 3
loading
Tags: GridControl
manohar
Asked On April 1, 2005 04:36 AM

Hi Clay, We found one problem while working with Find & Replace Dialog.If the cell contains Rich Text and when we replace part of text with some other text its taking away the Rich Text functionality of remaining text also.For example cell contains "Good Morning" , morning is in bold i can''t make it bold here.when i replace "Good" with "Something" morning is loosing bold. Regards, Manohar B.

Administrator [Syncfusion]
Replied On April 1, 2005 05:09 AM

How are you getting the RichText into the cell? What CellType are you using? The renderer for the CellType has a virtual method, ReplaceText, that the GridFindReplaceDialogSink calls to do the replacement for the particular CellType. So, to handle replacing richtext in a way that preserves the formatting (and anything else you want preserved), you would derived the cell control (meaning deriving both the CellModel class and CellRenderer class). In your derived renderer class, you would override ReplaceText to do what is necessary depending upon the cell type you are using.

manohar
Replied On April 4, 2005 08:16 AM

Hi, The cell type being used is RichText. I am currently using version 3.0.1.0. The replace ignores the richtext formating when replacing the text (it removes the formating totally including the text that is not being replaced. The entire RTF text is replaced by a new Text without any formating) Regards Manohar >How are you getting the RichText into the cell? What CellType are you using? > >The renderer for the CellType has a virtual method, ReplaceText, that the GridFindReplaceDialogSink calls to do the replacement for the particular CellType. > >So, to handle replacing richtext in a way that preserves the formatting (and anything else you want preserved), you would derived the cell control (meaning deriving both the CellModel class and CellRenderer class). In your derived renderer class, you would override ReplaceText to do what is necessary depending upon the cell type you are using. >

Administrator [Syncfusion]
Replied On April 4, 2005 01:43 PM

Here is a minimal sample showing how you can derive the cell control and handle this problem by overriding ReplaceText. http://www.syncfusion.com/Support/user/uploads/GC_RTF_Replace_4259d618.zip

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.

;