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

Trigger double click from client side on a RadScheduler Appointment

1 Answer 245 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Hemika
Top achievements
Rank 1
Hemika asked on 20 Jun 2013, 04:01 PM
Hello, 

I have created a context menu on the appointment in the radscheduler. I need the code to fire the double clicking event when I select an item from the context menu. I would be requiring the client side code. Also this should fire this event "OnClientAppointmentDoubleClick" 

Thanks,

1 Answer, 1 is accepted

Sort by
0
Boyan Dimitrov
Telerik team
answered on 21 Jun 2013, 01:50 PM
Hello,


I would like to clarify that usually events are meant to be fired under specific circumstances. For example the OnClientAppointmentDoubleClick is fired when user double clicks on specific appointment.

In your case I would suggest calling a custom function when user clicks on the appointment context menu item and send all necessary arguments as parameters to that function so the current appointment and RadScheduler client-side objects will be accessible. This approach is illustrated in the code snippet below:
//markup code
<telerik:RadScheduler runat="server" ID="RadScheduler1" OnClientAppointmentContextMenuItemClicked="ClientAppointmentContextMenuItemClicked">    
       <AppointmentContextMenuSettings EnableDefault="true" />
    </telerik:RadScheduler>

//JavaScript
function ClientAppointmentContextMenuItemClicked(sender, args) {
    customFunction(sender, args.get_appointment());
}
 
function customFunction(scheduler, clickedAppointment) {
    //here you are able to access the scheduler and the clicked appointment objects
}

Regards,
Boyan Dimitrov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Scheduler
Asked by
Hemika
Top achievements
Rank 1
Answers by
Boyan Dimitrov
Telerik team
Share this question
or