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

How to stop autopostback on calendar view changed

2 Answers 376 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
EmpowerIT
Top achievements
Rank 2
EmpowerIT asked on 18 Oct 2011, 01:42 AM
Hi,
I've got a RadCalendar control that has autopostback set to true. I am handling the event that fires when the selected date is changed on the rad calendar. However, when the calendar view is changed by using the fast navigation controls, a post back occurs. How do I stop that postback from happening?

Thanks

2 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 18 Oct 2011, 06:20 AM
Hello Empower,

Try the following JavaScript to set AutoPostBack to False OnCalenderViewChanging Client Event.
JS:
<script type="text/javascript">
function OnCalendarViewChanging(sender, args)
{
 sender._autoPostBack = false;
}
function OnDateSelecting(sender, args)
{
 sender._autoPostBack = true;
}
</script>

Thanks,
Shinu.
0
EmpowerIT
Top achievements
Rank 2
answered on 25 Oct 2011, 04:26 AM
Thanks!
Tags
Calendar
Asked by
EmpowerIT
Top achievements
Rank 2
Answers by
Shinu
Top achievements
Rank 2
EmpowerIT
Top achievements
Rank 2
Share this question
or