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

Using SharedCalendar with RadCalendar inside UpdatePanel

5 Answers 132 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Alexey
Top achievements
Rank 1
Alexey asked on 08 Aug 2008, 04:05 PM
Hello, all!

I placed an user control inside content page inserted in a master page. There are a lot of instances of the user control inside the content page. Each user control contains RadDatePicker and I would like to use a shared calendar via SharedCalendar property.

I placed RadCalendar into root of the content page and assigned the reference to this RadCalendar to RadDatePicker.SharedCalendar inside Page_Load.

The user controls, containing RadDatePickers are placed into UpdatePanels.

After each async postback I recieve error, saying that RadDatePicker's Java Script is unable to find  RadCalendar client instance.More exactly: $find returns NULL.

Seems, refreshed RadDatePicker kills the client instance of RadCalendar.

Is there a way to overcome such behaviour?

5 Answers, 1 is accepted

Sort by
0
Alexey
Top achievements
Rank 1
answered on 08 Aug 2008, 05:16 PM
The only way I was been able to fix the error is to place shared RadCalendar and all RadDatePickers, using this Calendar to the same UpdatePanel.

In other words: the scenario with multiple RadDatePickers inside different UpdatePanels and one RadCalendar in the root of the page (outside of the all UpdatePanels) doesn't work due relasing the client object after async postback.
0
Roy
Top achievements
Rank 1
answered on 10 Aug 2008, 04:52 AM
this is the same as my problem, discribed in the thread "shared calendars and ajax"...
0
Konstantin Petkov
Telerik team
answered on 11 Aug 2008, 06:22 AM
Hi guys,

What's specific to such a scenario is that the SharedCalendar should be updated as well upon AJAX request. This is applicable both for the MS AJAX as well as when using RadAjax controls (manager or panel).

Kind regards,
Konstantin Petkov
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Alexey
Top achievements
Rank 1
answered on 11 Aug 2008, 07:57 AM
Thank you, Konstantin. But, why DataPicker disposes shared Calendar's behaviour instance on each postback? It looks quite strange.
0
Roy
Top achievements
Rank 1
answered on 11 Aug 2008, 08:02 AM
Updating the shared calendar means rerendering it.
In order to achive better performs, one would prefere not rendering the calendar each time the pickers are refreshed, as no actual change is made in the calendar.
Tags
Calendar
Asked by
Alexey
Top achievements
Rank 1
Answers by
Alexey
Top achievements
Rank 1
Roy
Top achievements
Rank 1
Konstantin Petkov
Telerik team
Share this question
or