How to stop autopostback on calendar view changed

3 posts, 1 answers
  1. EmpowerIT
    EmpowerIT avatar
    117 posts
    Member since:
    Jun 2007

    Posted 17 Oct 2011 Link to this post

    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. Answer
    Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 18 Oct 2011 Link to this post

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

    Posted 24 Oct 2011 Link to this post

    Thanks!
Back to Top