Reacting to edit event without overriding

4 posts, 0 answers
  1. Jonathan
    Jonathan avatar
    14 posts
    Member since:
    Feb 2011

    Posted 03 Nov 2011 Link to this post

    I have some extra fields in my appointment table which are not user-edited fields, but rather need to be generated from the appointment's information when the appointment is created or updated.
     
    Is there a way for me to hook onto an event of the Radscheduler so that on inserts and updates, I can generate my extra field data, without interfering with Radscheduler's binding still handling the normal fields? Perhaps a way to have Radscheduler call my recalcuation function after every time it does an insert or update? I don't want to have to rewrite the whole edit/insert event. Is there a better way?
  2. Plamen
    Admin
    Plamen avatar
    3047 posts

    Posted 07 Nov 2011 Link to this post

    Hello Jonathan,

    Have you considered the way insert and update are handled in the Bind To Generic List demo?

    Regards,
    Plamen Zdravkov
    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. Jonathan
    Jonathan avatar
    14 posts
    Member since:
    Feb 2011

    Posted 07 Nov 2011 Link to this post

    Doesn't the Bind To Generic List demo override the scheduler's save event and prevent the scheduler from doing its own saving? Unless I'm misunderstanding it.

    Is there a way I can let the scheduler do its normal bound save to the database, but react to the fact that it just saved something by then triggering some additional code of my own? Or is it only possible to trigger additional code if I handle the database save myself?

    if I'm misunderstanding, and this sample actually does save to the database via normal binding while also running custom code to do other tasks, please do explain.
  4. Plamen
    Admin
    Plamen avatar
    3047 posts

    Posted 09 Nov 2011 Link to this post

    Hi Jonathan,

    Thank you for contacting us again.

    It looks that I misunderstood you in the beginning. In this demo the events are overwritten indeed.

    If you want to add additional custom fields for each appointments you can use the Custom Attributes.

    Please let me know if this is what you needed.

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