This is a migrated thread and some comments may be shown as answers.
RadCalendar1_SelectionChanged
5 Answers 33 Views
This is a migrated thread and some comments may be shown as answers.
Regeesh Joseph
Top achievements
Rank 1
Regeesh Joseph asked on 02 Aug 2010, 01:55 PM
Hai,

RadCalendar1_SelectionChanged event is not firing on clicking the dates.

Thanks & regards,
Regeesh

5 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 1
answered on 03 Aug 2010, 07:17 AM
Hello,

Have you set the AutoPostBack property of RadCalendar to True?


-Shinu.
0
Regeesh Joseph
Top achievements
Rank 1
answered on 03 Aug 2010, 02:48 PM
Hai,

I have set the AutoPostback to true, but it takes a lot of time to change the month. Is there any way to avoid postback on clicking the next month icon(> and <)  ?

Thanks & regards
Regeesh Joseph
0
Shinu
Top achievements
Rank 1
answered on 04 Aug 2010, 08:50 AM
Hello,


You can achieve the desired functionality by setting the AutoPostBack property from client side in corresponding events. Take a look at the following approach.

aspx:
<telerik:RadCalendar id="RadCalendar1" runat="server" AutoPostBack="True" OnSelectionChanged="RadCalendar1_SelectionChanged">         
    <ClientEvents OnCalendarViewChanging="OnCalendarViewChanging" OnDateClick="OnDateClick"/>         
</telerik:RadCalendar>


client code:
<script type="text/javascript"
function OnCalendarViewChanging(sender, eventArgs) 
    sender.set_autoPostBack(false); 
function OnDateClick(sender, eventArgs) 
    sender.set_autoPostBack(true); 
</script>


code behind:
protected void RadCalendar1_SelectionChanged(object sender, Telerik.Web.UI.Calendar.SelectedDatesEventArgs e) 
    // Your code here, when selecting date
}


-Shinu.
0
Regeesh Joseph
Top achievements
Rank 1
answered on 04 Aug 2010, 09:33 AM
Hai Shinu,

I have set as you suggested. But Javascript is not recognizing radcalendar. It is raising the error as : sender is undefined.

0
Regeesh Joseph
Top achievements
Rank 1
answered on 04 Aug 2010, 10:04 AM
Hai,

Thanks a lot. Javascript issue is solved after visual studio restart.
Asked by
Regeesh Joseph
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 1
Regeesh Joseph
Top achievements
Rank 1
Share this question
or