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

Module disabling problem

3 Answers 150 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Reinan Shook
Top achievements
Rank 1
Reinan Shook asked on 07 Feb 2008, 04:39 PM
I'm having a problem trying to set a module to disabled but allowing it to still be in the module list so that users can turn it on if they want. The code I'm using is as follows:

<telerik:RadEditor ID="contents" runat="server" Content='<%# Bind("contents") %>'
  <Modules> 
    <telerik:EditorModule Name="RadEditorStatistics" Visible="true" Enabled="true" /> 
    <telerik:EditorModule Name="RadEditorDomInspector" Visible="true" Enabled="false" /> 
    <telerik:EditorModule Name="RadEditorNodeInspector" Visible="true" Enabled="false" /> 
  </Modules> 
</telerik:RadEditor> 

The problem seems to relate to setting the visible property to true but the enabled property to false. When I do this I get the following javascript error:

Sys.InvalidOperationException: 'enabled' is not a property or an existing field.

When i get this error, the modules don't show up in the dropdown, and I get javascript errors when I click on it as well.

If I also set the visible property to false, there are no errors but then I don't get the desired functionality. What I want is for the modules to be initially disabled but show up in the list for users to enable if they want.

If anyone has any suggestions or solutions, i would greatly appreciate it.

Thanks,
Reinan

3 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 07 Feb 2008, 04:55 PM
Hi Reinan,

The problem is due to the following setting in your web.config file:
<compilation debug="true">

To fix the problem set the debug attribute to false and test again.

We are aware of the problem and we will fix the issue in one of the upcoming updates.

Best regards,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
ChrisS
Top achievements
Rank 1
answered on 22 Feb 2008, 04:02 PM
Dear Rumen,

Do you know which upcoming update this will be fixed in as I have just come across this problem as well?

As I am developing an application it isn't really feasible for me to turn off debugging.

The only way round this I have found is to set:

radEditorModule.Visible = False 

instead of:

radEditorModule.Enabled = False 

within the code.

Any timescales would be much appreciated.
0
Rumen
Telerik team
answered on 25 Feb 2008, 12:22 PM
Hi Chris,

If you want to have the module on the client you need to set the Visible property to true or false.
If you do not want to send the module to the client you need to exclude it from the modules collections.

But you shouldn't set the Enabled property, because this will lead to this bug. The Enabled property was ported from the classic RadEditor but it shouldn't be used in RadEditor "Prometheus". You should set only the Visible property.

We will remove most likely the Enabled property in the upcoming versions of RadEditor "Prometheus".

Best regards,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Editor
Asked by
Reinan Shook
Top achievements
Rank 1
Answers by
Rumen
Telerik team
ChrisS
Top achievements
Rank 1
Share this question
or