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

Interactive Mode -vs- Preview

4 Answers 38 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Reid
Top achievements
Rank 2
Reid asked on 16 Jan 2009, 03:07 PM
I have a RadCalendar that is showing read only dates highlighted for events on the calendar.  I have it set to Preview presentationtype.  This works fine for the dates being static with no interaction, but the user cannot navigate in this mode.

Can someone suggest how to control this?

Thanks

4 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 1
answered on 19 Jan 2009, 06:44 AM
Hi Ried,

Normally it is possible to navigate to other months evenif you set the PresentationType to Preview or Interactive. So if you want to prevent this feature, you can attach the below JavaScript with OnCalendarViewChanging event of RadCalendar.

JavaScript:
<script type="text/javascript">   
function OnCalendarViewChanging(sender, args) 
    args.set_cancel(true); 
</script>  

Thanks,
Shinu.
0
Reid
Top achievements
Rank 2
answered on 19 Jan 2009, 01:38 PM
Hello Shinu,

Thanks for the reply.  I added this code to an external .js file and added the function name to the grid's client side event property OnCalendarViewChanging.  I can confirm that the JS is being called via a breakpoint but the navigation never works.


This is a 3 "Layout_7columns_x_6rows" layout btw..  I just switched it to Interactive and the navigation is *still* not taking place.  So I would ask, if the calendar is set to the layout above will it allow navigation?
0
Accepted
Pavel
Telerik team
answered on 19 Jan 2009, 02:36 PM
Hello Reid,

The code that Shinu suggested is for preventing navigation on the client and if I understand you correctly you want to enable it.
In this case If you have set either MultiViewRows or MultiViewColumns property to more than "1" you need to set the AutoPostBack property of the Calendar to "true" in order to enable navigation. This is explained in this help article.
 
I hope this helps.

Greetings,
Pavel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Reid
Top achievements
Rank 2
answered on 19 Jan 2009, 04:55 PM
Thank you Pavel and Shinu, I have a better understanding now and it is working fine.
Tags
Calendar
Asked by
Reid
Top achievements
Rank 2
Answers by
Shinu
Top achievements
Rank 1
Reid
Top achievements
Rank 2
Pavel
Telerik team
Share this question
or