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

[Solved] Ajax Manager / Date Picker ScriptResources

8 Answers 138 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 18 Feb 2008, 05:28 PM
We have an Prometheus AjaxManager that is controlling many of the updates on our page. First, a Prometheus treeview node is selected. Depending on which node, and ASP:Panel is made visible to the right of the treeview with information about the node. In the panel, we have a standard drop down list. When different options are selected in the drop down list, it displays different controls. One of the controls that we are having problems with is a calendar picker control (made by another 3rd party). When this control is visible it doesn't not allow the calendar to be displayed.

If we switch tabs (causing a postback), and then change back to the tab that has the treeview and panel, the calendar control starts working just fine. From looking at the output on the page, it appears that some additional ScriptResource.axd files and CSS declarations are output to the page. I tried switching over to the Prometheus Telerik RadDatePicker, but had similar results.

8 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 19 Feb 2008, 08:19 AM
Hi Rob,

This is a known limitation of the MS AJAX framework - it does not update the page head tag and therefore, when you want to show a 3rd party control that is initially not visible, this control would not be able to register it styles on the page. To get over this limitation you can either:
Hope these help.

All the best,
Steve
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Paul
Top achievements
Rank 1
answered on 19 Feb 2008, 05:40 PM
We've tried the EnablePageHeadUpdate and it still does not work. I'm not so worried about the CSS stuff, but for some reason the scripts don't seem to be firing at all. It should be popping up a calendar and it doesn't. I'm comfortable with the CSS not working if I know that the scripts are being output correctly to the page. I don't think any of the ScriptResource.axd files are being output when the 3rd party control is set to visible.
0
Steve
Telerik team
answered on 20 Feb 2008, 08:58 AM
Hello Rob,

This is strange and it should be working. I'm starting to suspect that the 3rd party calendar solution you use is not ajax aware. Have you tried this with our datepicker control or the 3rd party calendar with MS AJAX instead of Prometheus Ajax. Any further information you could provide would be highly appreciated and help us pinpoint the problem.

Greetings,
Steve
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Paul
Top achievements
Rank 1
answered on 20 Feb 2008, 03:43 PM
Oddly enough, the first time I tried swapping it out previously and it didn't work (I was getting JavaScript errors). Now, I'm getting the drop down to show up with the Prometheus RadDatePicker. However, the calendar style is not being applied (it's transparent). I have EnablePageHeadUpdate = True, so I figured that would fix the CSS issue. Is there something else that I need to do to get this working? Thanks...
0
Steve
Telerik team
answered on 20 Feb 2008, 04:46 PM
Hello Rob,

Registering the script manually as I suggested should resolve the problem, although EnablePageHeadUpdate should work for your case as well. Anyway our developers have now implemented a new way of registering the css for the controls, so that showing them on ajax context would not cause problems anymore.

Sorry for the inconvenience.

All the best,
Steve
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Paul
Top achievements
Rank 1
answered on 25 Feb 2008, 09:12 PM
Did any of the changes that they were going to make end up in the SP2 release today? I noticed a few more options such as the ability to enable/disable embedded scripts and EnableAjaxSkinRendering, EnableEmbeddedBaseStylesheet, etc. I've installed the SP2 update and the same transparent calendar still appears with the RadDatePicker after the AjaxManager makes it visible. If I were to cause a postback outside of the AjaxManager, then the calendar and styles will appear correctly from then on.
0
Steve
Telerik team
answered on 27 Feb 2008, 12:21 PM
Hi Rob Houck,

The only new property on this matter is the EnableAjaxSkinRendering property which is the one I was referring to in my previous post. By default it is true and will be set to false, once the control registers its scripts. This property would only work in case you are using one of the embedded skins.
If you are using a custom skin, make sure:
  • you have EnableEmbeddedSkins="false"
  • have your custom Skin placed in a Skin folder in the root of the project
  • have the Skin property set to your custom Skin (Skin="MyCustomSkin")
  • register the css stylesheet manually
If the problem still persists, please open a support ticket and attach a sample runnable project, showing the erroneous behavior at hand.

All the best,
Steve
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Paul
Top achievements
Rank 1
answered on 27 Feb 2008, 03:00 PM
I've created a sample app and submitted a ticket.
Tags
Ajax
Asked by
Paul
Top achievements
Rank 1
Answers by
Steve
Telerik team
Paul
Top achievements
Rank 1
Share this question
or