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

OnClientAppointmentClick blocks default action on DblClick

13 Answers 162 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Stuart Hemming
Top achievements
Rank 2
Stuart Hemming asked on 08 Jun 2011, 12:05 PM
The scheduler opens the edit form (in my case a custom form) when I double click on the appointment.

I now have a requirement to generate an Ajax requires on a client-side single click. Having written the code to do this I can't get a double click to fire the default action, ie open the custom form.

What am I missing?

-- 
Stuart

13 Answers, 1 is accepted

Sort by
0
Veronica
Telerik team
answered on 08 Jun 2011, 12:09 PM
Hi Stuart,

If I understood you correctly you want to open your custom edit form on single click. In that case please take a look at this help article.

Please let me know if I got your question.

Kind regards,
Veronica Milcheva
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
Stuart Hemming
Top achievements
Rank 2
answered on 08 Jun 2011, 12:28 PM
No, sorry, I didn't make myself clear.

I currently open the custom form on DblClick and I don't want that to change.

I now need to be able to fire an ajax request on single click (which I am successfully doing) but I still need to have the form open on DblClick and having caught and processed the single click event the default double click event no longer works.

-- 
Stuart
0
Veronica
Telerik team
answered on 13 Jun 2011, 01:39 PM
Hello Stuart,

Thank you for the detailed explanation.

Please note that you can not use AppointmentClick and AppointmentDoubleClick on one and the same time. The RadScheduler is designed so that after a single-click on an appointment - the double-click doesn't fire. The reason is that e can not handle both events. After postback on single-click or an ajax callback you will loose the double-click.

I hope i was clear. Please let me know if you have further questions.

Greetings,
Veronica Milcheva
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
Stuart Hemming
Top achievements
Rank 2
answered on 13 Jun 2011, 01:42 PM
Sorry Veronica, but you've misunderstood.

I'm not trying to handle both events.

By default, RadScheduler opens an appointment if you double click, yes? I want to handle just the AppointmentClick (single click) event.

Doing so prevents the default action of the RadScheduler. Is this what you expect to happen?

-- 
Stuart
0
Veronica
Telerik team
answered on 16 Jun 2011, 01:33 PM
Hi Stuart,

Please accept my apologies for misleading you.

Yes, you are right that you can insert/ edit appointments by double-clicking them. When you are double-clicking on appointment the AppointmentDoubleClick event is fired. This is the default behavior of the RadScheduler.
However the AppointmentClick (single-click) event is fired only when the RadScheduler is ReadOnly. This is because you can not handle both events AppointmentClick and AppointmentDoubleClick in one and the same time.

Kind regards,
Veronica Milcheva
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
Stuart Hemming
Top achievements
Rank 2
answered on 20 Jun 2011, 11:43 PM
So, you are saying that it is not possible to select an appointment for, as an example, updating a panel elsewhere on the screen, unless I make the scheduler read-only?

-- 
Stuart
0
Veronica
Telerik team
answered on 24 Jun 2011, 09:33 AM
Hi Stuart,

Yes, you can not use the AppointmentClick event unless you make the RadScheduler read-only ar at least forbid the editing of appointments via the AllowEdit property.That's why my suggestion in your case is to use AppointmentTemplate (a button to click on the appointment to see a panel somewhere on the screen with additional info). Please take a look at this demo for an example.

Regards,
Veronica Milcheva
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
Stuart Hemming
Top achievements
Rank 2
answered on 27 Jun 2011, 09:03 AM
Have you looked at that example? In MonthView?

However, I do understand your point. 

I am going to adopt a different approach and use a RadToolTip to display a control as there are a number of actions, rather than one, that I need to be able to perform.

'tis a shame though 'cos I'm pretty sure you could select and edit in previous versions of this control (2009 ish).

-- 
Stuart
0
Veronica
Telerik team
answered on 04 Jul 2011, 07:09 AM
Hi Stuart,

Yes, I've looked at the example. I'm glad that you are going to change your approach.

Please let me know if you have further questions.

Best wishes,
Veronica Milcheva
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
Prava kafle
Top achievements
Rank 1
answered on 21 Feb 2013, 08:09 PM
Hi,

I am also having an issue with   Scheduler's OnClientAppointmentClick and OnClientAppointmentDoubleClick events.
Single click on appointment works fine but when I double click an appointment it fires appointmentclick event  followed by OnClientAppointmentDoubleClick.

How can I avoid  appointmentclick  on double clicking an appointment, is it even possible?

OnClientAppointmentClick="singleClick"
OnClientAppointmentDoubleClick="DoubleClick"

Thanks,
Prava
0
Princy
Top achievements
Rank 2
answered on 22 Feb 2013, 05:24 AM
Hello Prava,

Please note that you cannot use AppointmentClick and AppointmentDoubleClick on one and the same time. The RadScheduler is designed so that after a single-click on an appointment - the double-click doesn't fire. The reason is that e cannot handle both events. After postback on single-click or an ajax callback you will loose the double-click.

I hope it was clear. Please let me know if you have further questions.

Thanks,
Princy.
0
Prava kafle
Top achievements
Rank 1
answered on 22 Feb 2013, 01:26 PM
HI Princy,
I am sending ajax request on single click, and on double click it opens edit appointment window.
When I double click an appointment, it sends ajax request and also opens edit appointment window. 

I do not want it to send ajax request( fire singleclick) when I am doubleclicking. Is there a way to identify double click from single click avoid sending ajax request besides using timer.

Thanks,
Prava
0
Dimitar Terziev
Telerik team
answered on 26 Feb 2013, 04:04 PM
Hi Prava,

In order to achieve the desired functionality you could initiate the ajax in a timeout function. In the double click event handler function this timeout will be cleared which will prevent the Ajax request. More information on the matter could be found here.

Greetings,
Dimitar Terziev
the Telerik team
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 their blog feed now.
Tags
Scheduler
Asked by
Stuart Hemming
Top achievements
Rank 2
Answers by
Veronica
Telerik team
Stuart Hemming
Top achievements
Rank 2
Prava kafle
Top achievements
Rank 1
Princy
Top achievements
Rank 2
Dimitar Terziev
Telerik team
Share this question
or