Question on Scheduler/ToolTip Demo

3 posts, 0 answers
  1. Jim
    Jim avatar
    23 posts
    Member since:
    Nov 2007

    Posted 16 Jul 2009 Link to this post

    I have a general question on the demo found at
    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. Peter
    Peter avatar
    6637 posts

    Posted 16 Jul 2009 Link to this post

    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,
    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.
  3. DevCraft R3 2016 release webinar banner
  4. Jim
    Jim avatar
    23 posts
    Member since:
    Nov 2007

    Posted 16 Jul 2009 Link to this post

    :)  Thanks
Back to Top