This is a migrated thread and some comments may be shown as answers.

Displaying data in the Same Format (Maintain Screen)

2 Answers 60 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Tommy
Top achievements
Rank 1
Tommy asked on 20 Jun 2010, 08:26 AM
Hello everyone,

I am using a RadEditor for a small messaging system. However when the user clicks my maintain screen it brings back the data. However the data is not in the same format as they saved it in. Such as spacing, paragraphs, bold, italics, etc. Kind of like these forums, I want to be able to hit edit post or Manage button and comes back with the exact format that the user entered before. Can anyone provide me some assistance. It would be greatly appreciated.

Thanks,
Tommy

2 Answers, 1 is accepted

Sort by
0
Tommy
Top achievements
Rank 1
answered on 21 Jun 2010, 08:28 AM
I've figured out how to display the text in the same format. However on my maintain screen if they update the text. It's not updating in the database anymore. Is this because the .content? How do I need to resolve this. Its not using post back.
0
Rumen
Telerik team
answered on 21 Jun 2010, 03:25 PM
Hi Tommy,

Please, see the following live demos which demonstrates how to save the RadEditor's content in a Database and in External HTML file:
Save In Database,
Save in External File
and
Datagrid Edit Template.

On the other hand, your problem is more likely related to overriding the editor content yourself, in your Page_Load method. Please note that if you read the content of the editor in an event handler (such as a button event handler) this event handler executes later in the page lifecycle compared to Page_Load. This is why, in case you set the initial content in Page_Load it is mandatory to add a check, e.g.

if (!Page.IsPostBack)
{
    radEditor1.Html = "Some content";
}

In case you are having any difficulty, our suggestion is to implement your scenario using a simple <asp:TextBox> instead of RadEditor. Once you get the textbox to work as needed, all you need to do is change the textbox to RadEditor - and all should be fine.

In case you are able to implement your scenario with a simple <asp:TextBox>, yet you are facing trouble with the RadEditor, please send us your working project in a support ticket and we will make the change for you.

Greetings,
Rumen
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Editor
Asked by
Tommy
Top achievements
Rank 1
Answers by
Tommy
Top achievements
Rank 1
Rumen
Telerik team
Share this question
or