Hi, how can i prevent a double click on a day to create a new appointment.
i want Display the month view , but only user's with rights to create a new appointment should be able to create a new one.
how can i done this?regards martin
Hello Martin,
I have investigated the case and I would like to tell that you can disable the appointment dialog by using the client event DbClick like this:
<igsch:WebDayView ID="WebDayView1" runat="server" VisibleDays="5" >
<ClientEvents DblClick="WebDayView1_DblClick" />
</igsch:WebDayView>
function DblClick(oDayView, oEvent, element) {
oEvent.cancel = true;
}
If you have further questions don’t hesitate to contact me.
Hi marina, thanks for your reply.
one more thing. this is only possible in javascript but not codebehind?
we use it in our intranet an depends from the logged user should be able the create new appointment.
but when i cancel the add appointment dialog, what is the best way to show the details of an calendar event (i thought this is normally when the user double click on the day)
martin
You can disable the appointment by setting the EnableAutoActivityDialog to false. This can be done in the code behind like this:
WebMonthView1.EnableAutoActivityDialog = false;
What is more if you want to allow double-click on an event to see it’s details and meanwhile disable double-clicking on other days, so that the clients won’t be able to create a new appointment, you can set the EnableAutoActivityDialog to true and use the Client-Side event to check whether the user has selected an activity or not.
Client Side Event:
if (oDayView.getSelectedActivity() == null){
Code Behind:
WebMonthView1.EnableAutoActivityDialog = true;
Please let me know, how my suggestions work for you.