Scheduler Current Cell Element

1 Answer 100 Views
Scheduler and Reminder
PeterT
Top achievements
Rank 1
Iron
PeterT asked on 12 Aug 2021, 05:12 AM

 

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;
                }
            }
        }

   
   

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 12 Aug 2021, 10:08 AM

Hello, Peter,

Your question has already been answered in the support ticket (ID 1531402) you have opened on the same topic. Please, see our answer there for more information.
We kindly ask you to use just one thread for a specific problem to contact us. Posting the same questions numerous times slows down our response time because we will need to review and address two or more tickets instead of one. Moreover, threads are handled according to license and time of posting, so if it is an urgent problem, we suggest you use a support ticket, which would be handled before a forum thread.

Thank you for your understanding.

Regards,
Dess | Tech Support Engineer, Principal
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Scheduler and Reminder
Asked by
PeterT
Top achievements
Rank 1
Iron
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or