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

[Solved] Show editor in read only mode on page load

3 Answers 130 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Barbara
Top achievements
Rank 1
Barbara asked on 09 Sep 2008, 12:33 PM
Hello,
In the page_load event I set the RADEditors on that page to enabled = false if some conditions are fulfilled. The reason is that sometimes the user is only allowed to read the content of the editors. The content comes from the database.
The problem is that the lay out of the editors is gone, only the content is shown and because there are no scroll bars, the height of the editor is too big. How can I get scrollbars around the editors or keep the normal lay out in this situation? I use RADControls for ASPNET AJAX Q2

Thanks in advance,
Barbara

3 Answers, 1 is accepted

Sort by
0
Tervel
Telerik team
answered on 11 Sep 2008, 06:58 AM
Hello Barbara,

You could easily achieve your goal by simply specifying the CSS property oveflow:auto for the editor's root element. You can even set it in its declaration, like that:

 <telerik:RadEditor ID="RadEditor1" runat="server"
         Enabled=false style="overflow:auto"... />

It should work properly regardless whether the editor's Enabled property is set to true or false.


All the best,
Tervel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Duane
Top achievements
Rank 1
answered on 29 Jul 2009, 02:45 PM
I have this same problem with the scroll bars being disabled, and the CSS fix doesn't work when adding the control programmatically.  What happens is the control is rendered as a div with and attribute of disabled="disabled" .  The control should be read-only even without that since it's creating a div and not the actual control, but what is happening is the disabled attribute causes the scroll bars to be grayed out.  Any suggestions?

0
Rumen
Telerik team
answered on 30 Jul 2009, 11:39 AM
Hi Duane,

Since the provided information is insufficient and I am not sure why the disabled="disabled" is applied to the DIV element, I would invite you to open a support ticket and send a sample fully working project that demonstrates the problem. I will examine your code and scenario and once I am able to reproduce the issue, I will do my best to provide a solution.

Thank you for your assistance in advance.

Best regards,
Rumen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Editor
Asked by
Barbara
Top achievements
Rank 1
Answers by
Tervel
Telerik team
Duane
Top achievements
Rank 1
Rumen
Telerik team
Share this question
or