Using SharedCalendar with RadCalendar inside UpdatePanel

6 posts, 0 answers
  1. Alexey
    Alexey avatar
    9 posts
    Member since:
    Aug 2008

    Posted 08 Aug 2008 Link to this post

    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?
  2. Alexey
    Alexey avatar
    9 posts
    Member since:
    Aug 2008

    Posted 08 Aug 2008 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Roy
    Roy avatar
    36 posts
    Member since:
    Jun 2008

    Posted 09 Aug 2008 Link to this post

    this is the same as my problem, discribed in the thread "shared calendars and ajax"...
  5. Konstantin Petkov
    Admin
    Konstantin Petkov avatar
    1911 posts

    Posted 11 Aug 2008 Link to this post

    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.
  6. Alexey
    Alexey avatar
    9 posts
    Member since:
    Aug 2008

    Posted 11 Aug 2008 Link to this post

    Thank you, Konstantin. But, why DataPicker disposes shared Calendar's behaviour instance on each postback? It looks quite strange.
  7. Roy
    Roy avatar
    36 posts
    Member since:
    Jun 2008

    Posted 11 Aug 2008 Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017