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

DateCellQueryInfo event in GGC?

Thread ID:





51588 Nov 9,2006 03:34 AM UTC Nov 9,2006 11:55 AM UTC WinForms 1
Tags: Grouping
Michael Lorenz
Asked On November 9, 2006 03:34 AM UTC


I was wondering if it's possible to trap the DateCellQueryInfo event from a GridGroupingControl? I have a couple of columns that are of the MonthCalendar type, and I'd like to trap this event so that I can remove all dates prior to the current date from the calendar. For a regular MonthCalendarAdv control I have something like:

private void Calendar_DateCellQueryInfo(object sender, DateCellQueryInfoEventArgs e) {

if (dt < ((MonthCalendarAdv)sender).MinValue || dt > ((MonthCalendarAdv)sender).MaxValue || dt.DayOfWeek == DayOfWeek.Saturday || dt.DayOfWeek == DayOfWeek.Sunday) {
e.Style.CellValue = null;


Can this also be done from the calendar dropdown in the GGC? If so, can you please post a code snippet showing how this is accomplished?


Administrator [Syncfusion]
Replied On November 9, 2006 11:55 AM UTC

Hi Michael,

The Grid's MonthCalendar celltype implements the System.Windows.MonthCalender control in DropDownContainer of the cell. It doesn't implement the Syncfusion.Windows.Tools.MonthCalendarAdv control in a DropDownContainer of the cell. You can use the GridDropDownMonthCalendarCellRenderer to acess the MonthCalendar control in a cell. Here is a code snippet

GridDropDownMonthCalendarCellRenderer cr = this.gridGroupingControl1.TableControl.CellRenderers["MonthCalendar"] as GridDropDownMonthCalendarCellRenderer;
foreach(Control c in cr.DropDownContainer.Controls)
if( c is MonthCalendarAdv )
MonthCalendar cCalendar = c as MonthCalendar;
//you can use the any event from here....

If you want to implement the MonthCalendarAdv control in a cell, you need to create the custom celltypes. Please try the attached sample which implements the MonthCalendarAdv in a cell and let me know if you are looking something different.

Here is a sample.

Best Regards,


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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

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