Insert into RadScheduler without datasource

2 posts, 0 answers
  1. Jostein
    Jostein avatar
    16 posts
    Member since:
    Oct 2011

    Posted 06 Oct 2011 Link to this post

    My issue is somewhat the same as Paul's here:
    http://www.telerik.com/community/forums/aspnet-ajax/scheduler/server-side-control-over-functionality.aspx

    But my question is simpler. I have no datasource at all. All i want to do ATM is:
    On a click on a normal asp button on the page, i want an appointment label inserted into the scheduler, say from 12:00 to 13:00 on the current day. And i want to do it from codebehind. Thats all. Anyone?
  2. Jostein
    Jostein avatar
    16 posts
    Member since:
    Oct 2011

    Posted 07 Oct 2011 Link to this post

    Figured this out:

     

    oApp =

     

    New Telerik.Web.UI.Appointment

     

     

     

     

     

     

    oApp.Description = GetEntityTypeName(oTemp.Type)

    oApp.Subject = oTemp.Name

    oApp.Start = RadScheduler1.DisplayToUtc(oTemp.StartTime)

    oApp.End = RadScheduler1.DisplayToUtc(oTemp.EndTime)

    oApp.ID = oTemp.ID

    RadScheduler1.InsertAppointment(oApp)



    The reason this did not work for me at first, was that my dates only contained a time of day and not a date.
Back to Top