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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

click events on schedule navigation calender

Thread ID:

Created:

Updated:

Platform:

Replies:

72031 Feb 27,2008 11:00 AM UTC Dec 8,2017 04:10 AM UTC WinForms 9
loading
Tags: ScheduleControl
apwickrama
Asked On February 27, 2008 11:00 AM UTC

How to write to the event to the click in navigation calender


Administrator [Syncfusion]
Replied On March 5, 2008 12:25 PM UTC

Hi,

You can use Click event of the ScheduleControl.Calendar for this purpose.

this.scheduleControl1.Calendar.Click += new EventHandler(Calendar_Click);
void Calendar_Click(object sender, EventArgs e)
{
//Write Code
}


Kindly let me know if this helps.
Thanks,
Jisha


Thanh Le Minh
Replied On March 14, 2017 03:41 AM UTC

Hi,

You can try  this.scheduleControl1.DateValueChanged += new DateValueChangedEventHandler(Calendar_ValueChanged);

private void Calendar_ValueChanged(object sender, EventArgs e)
        {
             //Add code here
        }


Piruthiviraj Malaimelraj [Syncfusion]
Replied On March 14, 2017 01:06 PM UTC

Hi Thanh Le Minh, 
 
Thanks for your suggestion. The DateValueChanged or Click event of Calendar can be used for observing the date values from navigation calendar. 
  
Regards, 
Piruthiviraj

Raul
Replied On August 23, 2017 01:31 PM UTC

Hi.

I tried both solutions but don´t work for me. Anyone of both events fires. Nothing occurs

Thanks in advance

Raul


Mohanraj Gunasekaran [Syncfusion]
Replied On August 24, 2017 11:50 AM UTC

Hi Raul,   
   
Thanks for your update.   
   
By default, DateValueChanged event will be triggered whenever try to navigate to previous/next month using navigation calendar arrows (< >). Please refer the below screenshot,   
  
Screenshot   
    
   
Suggestion 1   
If you want the event when change the date by clicking inside of the navigation calendar, you can use the SelectedDates.SelectionsChanged orCalenderGrid.CellClick event. Please refer the below code example,   
   
Code example    
//Suggestion1   
this.scheduleControl1.Calendar.SelectedDates.SelectionsChanged += SelectedDates_SelectionsChanged;   
//Suggestion2   
this.scheduleControl1.Calendar.CalenderGrid.CellClick += CalenderGrid_CellClick;   
   
   
   
Screenshot   
    
   
   
Suggestion 2   
If you want to trigger the event when click on the appointment, you can use the ScheduleAppointmentClick event. Please refer to the below code example,   
   
Code example   
//You should attach the Syncfusion.Grid.Windows dll in your project   
this.scheduleControl1.GetScheduleHost().ScheduleAppointmentClick += Form1_ScheduleAppointmentClick;   
   
   
Suggestion 3   
If you want to trigger the event when selection changed in month view, you can use the GetScheduleHost().CellClick event. Please refer to the below code example,   
   
Code example   
//You should attach the Syncfusion.Grid.Windows dll in your project   
this.scheduleControl1.GetScheduleHost().CellClick += Form1_CellClick;   
   
   
If we misunderstood your scenario. Please provide the exact scenario when will you want to trigger the event. It will be helpful to provide the solution at the earliest.   
  
Regards,   
Mohanraj G   
 


manoyanx
Replied On December 7, 2017 02:19 AM UTC

Hi,

I can't make the Click event to work.

First I tried adding the event via code.

     ctlSchedule.Calendar.Click += new EventHandler(frmCalendar_Click);

Second, I tried adding it via Visual Studio's designer.

Both did not fire when I clicked the month navigation controls as pictured below.


What attribute do I use to get the start and end date of what is currently displayed by the calendar? For the screenshot above, I want to get Oct 30 and Dec 1.


Thanks

Mohanraj Gunasekaran [Syncfusion]
Replied On December 7, 2017 02:12 PM UTC

 Hi Renegene, 
 
Thanks for using Syncfusion product. 
 
Query 
Solution 
I can't make the Click event to work. 
 
First I tried adding the event via code. 
 
     ctlSchedule.Calendar.Click += new EventHandler(frmCalendar_Click); 
 
Suggestion1 
By default, Calendar.Click event does not trigger while clicking on the because we have handled this event internally. So, we would suggest to use the Calendar.CellClick instead of Calendar.Click event. Please refer to the below code example, 
 
Code example 
this.scheduleControl1.Calendar.CalenderGrid.CellClick += CalenderGrid_CellClick; 
 
void CalenderGrid_CellClick(object sender, Syncfusion.Windows.Forms.Grid.GridCellClickEventArgs e) 
{ 
   //Perform your operation. 
} 
 
Note: 
This event has not trigger while clicking on the Navigation panel to navigate the date view. 
 
Suggestion2 
You can use the Calendar.DateValueChanged event which has triggered when try to navigate the date using NavigationPanel. Please refer to the below code example, 
 
Code example 
this.scheduleControl1.Calendar.DateValueChanged += Calendar_DateValueChanged; 
 
void Calendar_DateValueChanged(object sender, EventArgs e) 
{ 
            //Perform your operation. 
} 
 
What attribute do I use to get the start and end date of what is currently displayed by the calendar? For the screenshot above, I want to get Oct 30 and Dec 1. 
In order to get the first and last date of selected calendar, you can use the TopLeftDate and BottomRightDate. Please refer to the below code example and the sample, 
 
Code example 
this.scheduleControl1.Calendar.TopLeftDate.ToShortDateString(); 
this.scheduleControl1.Calendar.BottomRightDate.ToShortDateString(); 
 
 
 
 
Sample link: ScheduleControl 
 
Please let us know if you have any concerns. 
 
Regards, 
Mohanraj G 


manoyanx
Replied On December 7, 2017 02:57 PM UTC

It works now. Thank you.

Mohanraj Gunasekaran [Syncfusion]
Replied On December 8, 2017 04:10 AM UTC

Hi Renegene, 
 
Thanks for your update. 
 
We are glad to know that your reported problem has resolved. 
 
Please let us know if you have any concerns. 
 
Regards, 
Mohanraj G 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;