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

Reacting to edit event without overriding

3 Answers 48 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Jonathan
Top achievements
Rank 1
Jonathan asked on 03 Nov 2011, 03:10 PM
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?

3 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 07 Nov 2011, 08:43 PM
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
0
Jonathan
Top achievements
Rank 1
answered on 07 Nov 2011, 11:14 PM
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.
0
Plamen
Telerik team
answered on 09 Nov 2011, 07:28 PM
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
Tags
Scheduler
Asked by
Jonathan
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Jonathan
Top achievements
Rank 1
Share this question
or