I have a problem when I disable the viewState for the RadScheduler. I know it's not safe doing that but I want my page to be as light as possible.
In the Page_load event, I load appointments from a database (on Init and Postback). The problem I have is that I cannot retreive the new appointments in the scheduler after a postback. If I check the Appointments collection, I don't have the new ones.
Can someone explain why I lost the new ones ? I was thinking that it's on the LoadPostData that you retreive the new data from the control. Do I miss something ?
protected void Page_Load(object sender, EventArgs e)
{
// Check AppointmentCollection. Always o element inside.
AppointmentCollection appointments = RadScheduler1.Appointments;
// Load Appointment
DateTime now = DateTime.UtcNow;
now = new DateTime(now.Year, now.Month, now.Day, now.Hour, 0, 0);
List<AppointmentInfo> appointments = new List<AppointmentInfo>();
appointments.Add(new AppointmentInfo("Programmer le scheduler", now, now.AddHours(1)));
RadScheduler1.DataKeyField = "ID";
RadScheduler1.DataSubjectField = "Subject";
RadScheduler1.DataStartField = "Start";
RadScheduler1.DataEndField = "End";
RadScheduler1.DataSource = appointments;
}