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

Problem when initially hidden in update panel

11 Answers 784 Views
Editor
This is a migrated thread and some comments may be shown as answers.
david
Top achievements
Rank 1
david asked on 28 Nov 2007, 11:21 PM
Hi i am having problems with the editor when its initially hidden and then is displayed when the control is wrapped in an update panel.
Example scenario: -> editor hidden press a button to make it visible and both controls are wrapped inside an update panel the editor renders as just a series of bullet points running down the page. To make sure there was nothing wrong with my code i tested it on the prometheus example website that is installed with the download on page:
/radControls_prometheus/Editor/Examples/Default/Defaulting.aspx

i just set the editor visible property to false and placed a button inside the update panel to make the editor visible. I had to place another editor on the page outside of the update panel and wrap it in a <div id='hidden' style='display:visible'><div> wrapper tag. Is there a better way to achieve this functionality?

11 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 29 Nov 2007, 01:58 PM
Hi David,

If the control is initially invisible and is shown after an ASP.NET AJAX update, you should manually register all the required CSS files in the head tag of your page. Otherwise the control will not be displayed correctly. The easiest way to do this is through a LINK element:

<head runat="server">
    <link rel="Stylesheet" type="text/css" href="Skins/Default/Editor.Default.css" />
    <link rel="Stylesheet" type="text/css" href="Skins/Editor.css" />

</head>

You can obtain the editor's skin folder from the RadControls "Prometheus" demos installation.

For your convenience I have attached a sample demo example demonstrating your scenario in which the editor works as expected.

Kind regards,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
aea13
Top achievements
Rank 1
answered on 08 Jan 2008, 08:24 PM
Thanks Rumen. 
To add to the above, after linking the 2 necessary CSS files in my masterpage, i also had to manually copy over the specific 'Editor' folder for the appropriate theme/skin that i was using.  Since I picked the Vista skin, i copied the whole 'Editor' folder from that skin directly into folder where i copied the 2 css files.  The 'editor' folder is now a subfolder of the location where the 2 css files are.

Again, thanks for the workaround.
0
Gompje
Top achievements
Rank 1
answered on 21 Jan 2008, 03:02 PM
I'm facing the exact same problem with all the prometheus controls. We made a dynamic form creator, so the user can build dynamic forms and add elements on the fly, including RadEditor, timepickers etc. All fully ajaxified.
And we 2 have the problem that when a user picks a RadEditor the style is loaded but "not remembered". result: a lot of dots and a non working editor

The provided solution is IMHO not satisfying because this would mean that we have to load the RadEditor styles all the time. Since we do not know what controls the user is going to pick! And what is the point then that we have a nice dll which has all the things we need embedded when we need to do things ourselves and set a reference to a copied file, which contains the exact same thing as the embedded one!

I'm aware that this problem could be a problem with the Ajax.net framework, but! still it's causing me headaches. At least, if there is no other solution than to manually link to the files, is it possible to provide a dll _without_any_styles_ included?
0
Tervel
Telerik team
answered on 21 Jan 2008, 03:15 PM
Hello,

RadAjax Prometheus works around this MS AJAX limitation and takes care of the styles of the Prometheus controls being loaded. If you decide to give it a try, you should be able to convert your MS AJAX UpdatePanels to RadAjaxPanels with minimal changes - this is what we suggest you do in your scenario.


Sincerely yours,
Tervel
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Gompje
Top achievements
Rank 1
answered on 28 Jan 2008, 09:09 AM
Thx, but in our case this didn't work because we want communication between the the panels (trigger system). Also we use the dock so we also get some performance issues then.
For now we always include a RadEditor on the form, and make it invisible with css. It would be nice to have the a better way but I don't see how this can be achieved.
The easiest way is that we could tell the editor (and the other controls) that he should not included his links to css and js inside the head tag, but inside the tag we give him. That way we can control the output, even if this means it's inside the other html. I know that's not "valid" but for us the most important thing is that it works in a fast and efficient way. Validation is optional.
0
Rumen
Telerik team
answered on 30 Jan 2008, 04:31 PM
Hi,

I have good news that we were able to fix the styling problem with the non properly applied controls' CSS styles that appears when loading RadControls "Prometheus" with Ajax request. The problem is fixed in our internal build, which will be released officially in the end of February' 2008.

Best regards,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
aea13
Top achievements
Rank 1
answered on 30 Jan 2008, 04:35 PM
Great news, thanks for the update, and work.

0
ChrisS
Top achievements
Rank 1
answered on 04 Apr 2008, 10:21 AM
Dear Rumen,

Was this fixed in build 2007.3 1425 as I am getting the same problem ie bullet points replacing the RAD Editor?

Many thanks
0
Rumen
Telerik team
answered on 04 Apr 2008, 11:32 AM
Hi Chris,

Yes, the skinning problem is fixed in versions 2008.1.325 and 2007.3.1425 of Telerik.Web.UI.dll. I made a test with both versions and I was not able to reproduce the problem. I have attached a sample running example with the latest Futures release of RadEditor in which the problem does not exist.

Kind 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 04 Apr 2008, 12:03 PM
Thanks for you reply.  I have opened up a support ticket with an example of the problem.

Many thanks
0
Rumen
Telerik team
answered on 04 Apr 2008, 01:00 PM
Hello Chris,

Thank you for the provided project. It helped us to reproduce the problem on our side and fix it. Here is my answer provided in your support ticket:

We were able to fix the problem by adding the red maked lines of code in the cmdPageViewKeyInformationEdit_Click eventhandler:

    Protected Sub cmdPageViewKeyInformationEdit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdPageViewKeyInformationEdit.Click
        panelPageViewKeyInformationDisplay.Visible = False
        panelPageViewKeyInformationEdit.Visible = True
        Dim editorRef As Telerik.Web.UI.RadEditor = CType(panelPageViewKeyInformationEdit.FindControl("OrganisationPosition"), Telerik.Web.UI.RadEditor)
        editorRef.EnableAjaxSkinRendering = True

    End Sub

Another way to fix the problem is to add a reference to the external skins of RadEditor, e.g.

<link href="Skins/Editor.css" rel="stylesheet" type="text/css" />
<link href="Skins/Default/Editor.Default.css" rel="stylesheet" type="text/css" />


I hope this helps.


Kind regards,
Rumen
the Telerik team

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