We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Not able to get selected date on schedule

Hello,

I am trying to get date selected in schedule control on button click event but not able to get it. Also, I have an all-day event for a single day more than 15 then how I can view all events on schedule control?



Attachment: Screenshot_519_50a54182.rar

1 Reply

JP Jagadeesan Pichaimuthu Syncfusion Team August 19, 2019 11:48 AM UTC

Hi Tech, 
 
Thanks for using Syncfusion product. 
 
Query 
Details 
I am trying to get date selected in schedule control on button click event but not able to get it 
We have analyzed your requirement and you can able to get the selected date value by using the below code snippet in button click. Here you can able to get the selected date by using the ClickDateTime method by passing the row index and column index of the ScheduleGrid. 
 
private void button1_Click(object sender, EventArgs e) 
{ 
    MethodInfo dynMethod = scheduleControl1.GetScheduleHost().GetType().GetMethod("ClickDateTime", 
       BindingFlags.NonPublic | BindingFlags.Instance, null, new Type[] { typeof(int), typeof(int) }, null); 
 
    var arguments =  new object[] { this.scheduleControl1.GetScheduleHost().CurrentCell.RowIndex,  
        this.scheduleControl1.GetScheduleHost().CurrentCell.ColIndex }; 
    var selectedDate = dynMethod.Invoke(scheduleControl1.GetScheduleHost(), arguments); 
 
    MessageBox.Show(selectedDate.ToString()); 
} 
 
Please refer the below sample for your reference. 
 
Please refer the below screen shot for your reference. 
 
 
 
Also, I have an all-day event for a single day more than 15 then how I can view all events on schedule control? 
We have analyzed your requirement to view all events in single day, but currently we don’t have support for this. Currently we can able to show only the limited events in each day like below, here on Jul 29 there is 5 events but two events only visible. 
 
 
 
If we misunderstood your requirement, please provide more information regarding the requirement. This would help us to proceed further. 
 
Regards, 
Jagadeesan

Loader.
Live Chat Icon For mobile
Up arrow icon