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.

Rich Text Editbox

Thread ID:

Created:

Updated:

Platform:

Replies:

28567 May 4,2005 02:13 PM Sep 2,2005 03:30 AM Windows Forms 6
loading
Tags: GridControl
Helmut Scheiss
Asked On May 4, 2005 02:13 PM

I have a situation with a column containing a Rich Text Edit box. When the data is committed to the database, it transforms to wierd characters such as \rtf0. Could this have anything to do with the underlying data type for that field (it''s currently set at nvarchar(155)? Thank you.

Administrator [Syncfusion]
Replied On May 4, 2005 02:53 PM

Things like \rtf0 are part of the richtext formatting. Do you want to save RichText to the database? Doing so, would be the only way to see it again as richtext, as if you save it strictly as the text, you lose the RichText formatting. If you do not need the RichText formatting, you can just use a TextBox cell. To convert this richtext to text, you can create a instabce of a RichTextBox and set this richtext formatted string to the RichTextBox.Rtf property. Then you can get the unformatted text from the Text property.

John Valescu
Replied On September 1, 2005 12:03 AM

My clients like the pop-up editor feature of the RichText box, but don''t need the formatting features. I replaced it with a normal textbox that does word wrapping and expands, but they don''t like the way it alters the size of the cell in the grid. Is there some easy way to use the Rich Text control (as a member of a DataBound Grid) and just make everything text? Thanks! >Things like \rtf0 are part of the richtext formatting. Do you want to save RichText to the database? Doing so, would be the only way to see it again as richtext, as if you save it strictly as the text, you lose the RichText formatting. If you do not need the RichText formatting, you can just use a TextBox cell. > >To convert this richtext to text, you can create a instabce of a RichTextBox and set this richtext formatted string to the RichTextBox.Rtf property. Then you can get the unformatted text from the Text property.

Administrator [Syncfusion]
Replied On September 1, 2005 03:37 AM

I am not sure I understand your question? Do you want a popup control based on a Windows Forms TextBox? If so, you can use one of the two techniques shown in this sample that popups either a modal form or a modalless usercontrol. \Syncfusion\Essential Studio\3.2.1.0\Windows\Grid.Windows\Samples\In Depth\DropDownFormAndUserControlSample

John Valescu
Replied On September 1, 2005 09:12 AM

No problem. I''ll try again. I guess I''m looking for the cell to have a dropdown button, like the RichTextControl. When the user clicks on it, it opens a window where they can edit their text comments. After closing the "edit window", the cell returns to its normal size. Much like the way the RichText control works now, except without and of the RichText features. Did I make this more complicated? >I am not sure I understand your question? > >Do you want a popup control based on a Windows Forms TextBox? If so, you can use one of the two techniques shown in this sample that popups either a modal form or a modalless usercontrol. >\Syncfusion\Essential Studio\3.2.1.0\Windows\Grid.Windows\Samples\In Depth\DropDownFormAndUserControlSample

John Valescu
Replied On September 1, 2005 11:50 PM

Please forgive my ignorance. I''ve spent many hours researching the RTB control and its interaction with SQL server. From what I can tell, SQL can store the output from a RTB control into an nvarchar datatype. Since I don''t have to have the formatting characters saved, I could use (as you previously stated) the rtf.text property to get this info. My question is how do I get to this method to accomplish this? I am using a DBDG with column #20 (called "comments"). I''ve only used the designer interface to set this up and after choosing "Rich Text Box" as the control for that cell, I don''t see any additional properties. I guess I need more navigation. Thank you! >No problem. I''ll try again. I guess I''m looking for the cell to have a dropdown button, like the RichTextControl. When the user clicks on it, it opens a window where they can edit their text comments. After closing the "edit window", the cell returns to its normal size. Much like the way the RichText control works now, except without and of the RichText features. Did I make this more complicated? > > > >>I am not sure I understand your question? >> >>Do you want a popup control based on a Windows Forms TextBox? If so, you can use one of the two techniques shown in this sample that popups either a modal form or a modalless usercontrol. >>\Syncfusion\Essential Studio\3.2.1.0\Windows\Grid.Windows\Samples\In Depth\DropDownFormAndUserControlSample

Administrator [Syncfusion]
Replied On September 2, 2005 03:30 AM

Why are you using RichText if you do not want to save richtext? Instead, it will be much simpler to just use regular text and display it it a regular textbox. Here is the sample suggested above modified to drop a textbox in the bottom 2 cells. http://www.syncfusion.com/Support/user/uploads/CS_c22d0bcd.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.

;