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

how to cancel appointment click event from client side?

1 Answer 155 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
chirag shah
Top achievements
Rank 1
chirag shah asked on 15 Sep 2010, 12:00 PM
I have radscheduler control which has its server side appointment click event. In some situations I have to set whole radscheduler as read only mode. During read only mode when I click on any appintment page posts back and appointment click event is called. Appointment edit form is not opening as it is read only that is correct but it post back to server side . How to avoid it so that It cant go to execute server side appointment click event in read only mode of scheduler ? I have tried OnClientAppointmentClick event of radscheduler but there is not method to cancel server side click event from client side. What should I do ?

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 16 Sep 2010, 05:51 PM
Hello chirag,

Please, try the following workaround:
function pageLoad() 
       
             var scheduler = $find('<%=RadScheduler1.ClientID %>'); 
             scheduler.get_appointments().forEach(function(app) { 
                 app.get_element().onclick = function(e) { 
                  if (!e) e = window.event;
                   if (e.stopPropagation) e.stopPropagation();
                   e.cancelBubble = true;
                 };                  
             }); 
       }


Best wishes,
Peter
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Scheduler
Asked by
chirag shah
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or