Cancelling postback, but not cancelling client side changes

9 posts, 0 answers
  1. Matthew
    Matthew avatar
    26 posts
    Member since:
    Dec 2007

    Posted 30 Oct 2012 Link to this post

    Hi there,

    I want to be able to call some server side methods when an appointment is moved, resized or deleted, but I do not want a postback to occur.  So I can capture the client side move event via OnClientAppointmentResizeEnd, OnClientAppointmentMoveEnd and OnClientAppointmentDeleting, but what I then want to do is cancel the postback that would happen.  I do not want to cancel the client side changes though, so args.set_cancel(true) will not do what I am after.

    Is there a way to do what I'm trying to do?

    Thanks for your help.

    Matthew
  2. Plamen
    Admin
    Plamen avatar
    2729 posts

    Posted 31 Oct 2012 Link to this post

    Hello Matthew, 

     
    The only workaround I could think of is to use RadScheduler with WebService binding.

    Hope this will be helpful.

    Greetings,
    Plamen
    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Matthew
    Matthew avatar
    26 posts
    Member since:
    Dec 2007

    Posted 31 Oct 2012 Link to this post

    Unfortunately no, that's not what I'm after.  But I think I have found a workaround by overwriting the postback function of the scheduler:

    sender.postback = function () { };

    However, I have another question now: if I have made changes to an appointment on the client side, how can I get the scheduler to update itself so the appointment is correctly displayed?  IE, I've made changes to the start time, end time and resource of the appointment using javascript.  How can I get those changes to reflect in the actual scheduler HTML?  scheduler.rebind() seems to actually cause a page refresh, and scheduler.repaint() doesn't seem to do anything.  How can I do what I am after?
  5. Plamen
    Admin
    Plamen avatar
    2729 posts

    Posted 01 Nov 2012 Link to this post

    Hello Matthew,

     
    In server side binding of RadScheduler you need the post back in order to refresh the Appointment. Only in WebService binding you can achieve it without a post back and that is why I suggested it in my previous reply.

    Hope this will explain the issue.

    All the best,
    Plamen
    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.
  6. Matthew
    Matthew avatar
    26 posts
    Member since:
    Dec 2007

    Posted 01 Nov 2012 Link to this post

    It doesn't, no.  So what you're telling me is that there is no way to refresh the view of the scheduler client side only (other than by using web service binding, which is not what I am after).  Is that right?
  7. Matthew
    Matthew avatar
    26 posts
    Member since:
    Dec 2007

    Posted 01 Nov 2012 Link to this post

    Given that there is a property on the appointment to get its HTML element, is there some way to calculate what the new position of that element should be based on the new resource and time?
  8. Plamen
    Admin
    Plamen avatar
    2729 posts

    Posted 06 Nov 2012 Link to this post

    Hello Matthew,

     
    Yes that is how RadScheduler works when it is bound server side -you can change the html element of an appointment with javascript  without a Postback but these changes will not be saved  anywhere and will be lost when a Postback occurs.

    Hope this will explain the issue.

    Kind regards,
    Plamen
    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.
  9. Matthew
    Matthew avatar
    26 posts
    Member since:
    Dec 2007

    Posted 06 Nov 2012 Link to this post

    You misunderstand my question.  My question is HOW do I determine where the element should now appear, or how do I tell the scheduler to reposition the appointment in its HTML?  So I change the appointment details in javascript.  That's all good, it now has the new time/location details of the appointment in its local variables.  And I understand that that will be lost on postback, but that's fine because I've already done an ajax callback to the server to notify it of the change.  My question is how do I tell the scheduler to please move the appointment in html terms so it now sits in the right place in the page?
  10. Plamen
    Admin
    Plamen avatar
    2729 posts

    Posted 09 Nov 2012 Link to this post

    Hi Matthew,

     
    Such custom behavior of the appointments is no supported by RadScheduler. 

    Kind regards,
    Plamen
    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