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

Question on Scheduler/ToolTip Demo

2 Answers 89 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Jim
Top achievements
Rank 2
Jim asked on 16 Jul 2009, 02:55 PM
Hello,
I have a general question on the demo found at http://demos.telerik.com/aspnet-ajax/scheduler/examples/radtooltip/defaultcs.aspx
I was able to duplicate this in my project, and it works perfectly.  I do not like simply cutting and pasting unless I fully understand the detail.   I am currious why the Scheduler appointment created and databoud events are assigned the way they are in the example.  Instead of declaring them in tag attributes in the ascx file,  they are assigned values in the code behind in the page load.  In addition, using the += and without checking for postback appears to me as though we are adding multiple duplicate event handlers.  I do not pertend to be an expert on this, in fact, it is why I ask the question as to gain a better understanding.  The following shows the page load from this exampe.

private void Page_Load(object sender, EventArgs e)
        {
            RadScheduler1.AppointmentCreated += RadScheduler1_AppointmentCreated;
            RadScheduler1.DataBound += RadScheduler1_DataBound;
        }

2 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 16 Jul 2009, 03:29 PM
Hi Jim,

There is no special reason why we attach on those events in page load. Sometimes when you are in code-behind and you don't want to switch to design or source view, you can use this technique. The end result is the same as if you hook to the events in the usual manner.


Best wishes,
Peter
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Jim
Top achievements
Rank 2
answered on 16 Jul 2009, 03:33 PM
:)  Thanks
Tags
Scheduler
Asked by
Jim
Top achievements
Rank 2
Answers by
Peter
Telerik team
Jim
Top achievements
Rank 2
Share this question
or