PaulMrozowski
Top achievements
Rank 1
PaulMrozowski
asked on 31 Mar 2008, 08:31 PM
I want a "read only" version of the calendar, but I'd like the users to be able to double-click on appointments to view their detail. If I set "AllowEdit" to false, the OnAppointmentClick event doesn't fire. If I enable it, the users can do things like drag and drop the appointments (which I definitely don't want). Any thoughts on how I can do this?
4 Answers, 1 is accepted
0
Hi Paul,
You can use the OnClientAppointmentDoubleClick instead of the server event. The client event will fire even if the appointment is read-only.
Peter
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
You can use the OnClientAppointmentDoubleClick instead of the server event. The client event will fire even if the appointment is read-only.
function OnClientAppointmentDoubleClick(sender, eventArgs) |
{ |
var subject = eventArgs.get_appointment().get_subject(); |
alert(subject); |
} |
Peter
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
Martin de Ruiter
Top achievements
Rank 2
answered on 02 Apr 2008, 01:17 PM
I also needed a read-only scheduler, however I wanted to be able to use the serverside events. So I had to use another approach. Basically what I do is something like calling in the OnAppointmentClick event:
e.Cancel = True
'Execute my own logic
That way I can use the serverside events, while using some sort of read-only mode.
e.Cancel = True
'Execute my own logic
That way I can use the serverside events, while using some sort of read-only mode.
0
sreedevi
Top achievements
Rank 1
answered on 02 Apr 2008, 03:16 PM
I am also in need of a readonly scheduler. But I am not seeing e.Cancel in OnAppointmentClick event. Could you please post your code to understand it better?
0
Martin de Ruiter
Top achievements
Rank 2
answered on 02 Apr 2008, 04:03 PM
Well for example, I want to disable that the scheduler creates its forms:
Then using AppointmentClick I can do what I want too:
Private Sub SAgenda_FormCreating(ByVal sender As Object, ByVal e As Telerik.Web.UI.SchedulerFormCreatingEventArgs) Handles SAgenda.FormCreating |
e.Cancel = True |
If (e.Appointment.ID Is Nothing) Then |
'Do stuff |
Else |
'Do other stuff |
End If |
End Sub |
Then using AppointmentClick I can do what I want too:
Private Sub SAgenda_AppointmentClick(ByVal sender As Object, ByVal e As Telerik.Web.UI.SchedulerEventArgs) Handles SAgenda.AppointmentClick |
'Do what I want |
End Sub |