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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

MonthCalendar DateChanged Event

Thread ID:

Created:

Updated:

Platform:

Replies:

48825 Sep 5,2006 08:10 AM UTC Sep 5,2006 09:10 AM UTC Windows Forms 1
loading
Tags: GridControl
Jay
Asked On September 5, 2006 08:10 AM UTC

I need to handle the MonthCalendar DateChanged event for a MonthCalendar style cell. Is there an elegant solution?

I have tried handling the CurrentCellChanged but that doesn''t work as I require.

Thanks in advance.

Administrator [Syncfusion]
Replied On September 5, 2006 09:10 AM UTC

Hi Jay,

You can access the GridDropDownMonthCalendarCellRenderer and can subscribe the MonthCalendar.DateChanged event to detect the date changes in the MonthCalendar cell. Below is a code snippet

GridDropDownMonthCalendarCellRenderer cr = this.grid.CellRenderers["MonthCalendar"] as GridDropDownMonthCalendarCellRenderer;
foreach(Control c in cr.DropDownContainer.Controls )
{
if( c is MonthCalendar )
{
MonthCalendar mc = c as MonthCalendar ;
mc.DateChanged +=new DateRangeEventHandler(mc_DateChanged);
break;
}
}

private void mc_DateChanged(object sender, DateRangeEventArgs e)
{
Console.WriteLine("DateChanged fired");
}

Thanks,
Haneef

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

;