RadCalendar Postback

3 posts, 0 answers
  1. Elvis
    Elvis avatar
    11 posts
    Member since:
    Jul 2008

    Posted 04 Dec 2008 Link to this post

    I need help figuring out why my sharedcalendar creates a postback (which refreshes the entire pages, like if I had no AJAX) after the user clicks to change months,

          <telerik:RadScriptManager ID="RadScriptManager1" runat="server">  
            </telerik:RadScriptManager> 
            telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
                <AjaxSettings> 
                    <telerik:AjaxSetting AjaxControlID="RadCalendar2">  
                        <UpdatedControls> 
                            <telerik:AjaxUpdatedControl ControlID="RadCalendar2" /> 
                        </UpdatedControls> 
                    </telerik:AjaxSetting> 
                    <telerik:AjaxSetting AjaxControlID="RadDatePicker1">  
                        <UpdatedControls> 
                            <telerik:AjaxUpdatedControl ControlID="RadDatePicker1" /> 
                        </UpdatedControls> 
                    </telerik:AjaxSetting> 
                </AjaxSettings> 
            </telerik:RadAjaxManager> 
     
     
        <telerik:RadDatePicker ID="RadDatePicker1" runat="server" Culture="English (United States)" Skin="Telerik" SharedCalendarID="radcalendar2">  
          <DateInput runat="server" LabelCssClass="radLabelCss_Telerik" Skin="Telerik">  
          </DateInput> 
          <Calendar runat="server" Skin="Telerik" UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False" ViewSelectorText="x">  
          </Calendar> 
     <DatePopupButton CssClass="radPopupImage_Telerik" /  
     

     

  2. Elvis
    Elvis avatar
    11 posts
    Member since:
    Jul 2008

    Posted 04 Dec 2008 Link to this post

    I found a solution to my initial problem by reading: http://www.telerik.com/community/forums/aspnet-ajax/calendar/month-navigation-causes-postback.aspx

    The problem now is that after the user changes a month special days are not maintained. I'm guessing that its caused due to the calendar not longer firing a postback and therefore my on load sub is not being called.

    Here  is my sub:
        Protected Sub addSpecialDays()  
            'grab holidays & floatings  
            Dim x As New GlobalClass  
            Dim xarr As New ArrayList : Dim xarr2 As New ArrayList : Dim n As Integer = 0  
            xarr = x.getXarrADV("SELECT name from tHolidays where type = 'holiday'")  
            xarr2 = x.getXarrADV("SELECT date from tHolidays where type = 'holiday'")  
     
            Dim dayn(xarr.Count) As Telerik.Web.UI.RadCalendarDay  
            While n < xarr.Count  
                dayn(n) = New Telerik.Web.UI.RadCalendarDay  
     
                dayn(n).ToolTip = xarr.Item(n)  
                dayn(n).Date = xarr2.Item(n)  
                dayn(n).Repeatable = Telerik.Web.UI.Calendar.RecurringEvents.DayAndMonth  
                dayn(n).ItemStyle.BorderColor = Drawing.Color.DarkRed  
                RadCalendar2.SpecialDays.Add(dayn(n))  
                RadCalendar2.FocusedDate = Now.Date 
                n = n + 1  
            End While 
     
        End Sub 
  3. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 08 Dec 2008 Link to this post

    Hi Elvis,

    In order to have the application works properly and the special days to apply on each month after navigation the AutoPost back property of the control should be set to "true"

    All the best,
    Maria Ilieva
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top