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

Insert into RadScheduler without datasource

1 Answer 63 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Jostein
Top achievements
Rank 1
Jostein asked on 06 Oct 2011, 03:46 PM
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?

1 Answer, 1 is accepted

Sort by
0
Jostein
Top achievements
Rank 1
answered on 07 Oct 2011, 09:05 AM

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.
Tags
Scheduler
Asked by
Jostein
Top achievements
Rank 1
Answers by
Jostein
Top achievements
Rank 1
Share this question
or