What I am trying to do is to check whether the current cell element containing an appointment inside a 'scheduler_click event'.
It appears when the current cell does not contain an appointment, the currentCellElementDate shows correctly. However, if the current cell does contain an appointment, the currentCellElementDate 'Time' is wrong always.
private void radScheduler1_Click (object sender, EventArgs e){
cmdCreateTest.Enabled = true;
cmdSubmitTest.Enabled = false;
cmdRemoveTest.Enabled = false;
DateTime currentCellElementDate = this.radScheduler1.SelectionBehavior.CurrentCellElement.Date;
foreach (AppointmentElement appointmentElement in this.radScheduler1.ViewElement.GetAppointmentElements())
{
Debug.WriteLine(appointmentElement.Start + " : " + currentCellElementDate);
if (appointmentElement.Start == currentCellElementDate)
{
cmdCreateTest.Enabled = false;
cmdSubmitTest.Enabled = true;
cmdRemoveTest.Enabled = true;
break;
}
}
}