OnClientAppointmentClick blocks default action on DblClick

14 posts, 0 answers
  1. Stuart Hemming
    Stuart Hemming avatar
    1622 posts
    Member since:
    Jul 2004

    Posted 08 Jun 2011 Link to this post

    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
  2. Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 08 Jun 2011 Link to this post

    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.

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Stuart Hemming
    Stuart Hemming avatar
    1622 posts
    Member since:
    Jul 2004

    Posted 08 Jun 2011 Link to this post

    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
  5. Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 13 Jun 2011 Link to this post

    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.

  6. Stuart Hemming
    Stuart Hemming avatar
    1622 posts
    Member since:
    Jul 2004

    Posted 13 Jun 2011 Link to this post

    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
  7. Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 16 Jun 2011 Link to this post

    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.

  8. Stuart Hemming
    Stuart Hemming avatar
    1622 posts
    Member since:
    Jul 2004

    Posted 20 Jun 2011 Link to this post

    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
  9. Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 24 Jun 2011 Link to this post

    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.

  10. Stuart Hemming
    Stuart Hemming avatar
    1622 posts
    Member since:
    Jul 2004

    Posted 27 Jun 2011 Link to this post

    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
  11. Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 04 Jul 2011 Link to this post

    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.

  12. Prava kafle
    Prava kafle avatar
    212 posts
    Member since:
    Apr 2010

    Posted 21 Feb 2013 Link to this post

    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
  13. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 21 Feb 2013 Link to this post

    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.
  14. Prava kafle
    Prava kafle avatar
    212 posts
    Member since:
    Apr 2010

    Posted 22 Feb 2013 Link to this post

    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
  15. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1266 posts

    Posted 26 Feb 2013 Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017