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

How to solve the hover issue in the date cell dropdown in WinForms GridGroupingControl?

Platform: WinForms |
Control: GridGroupingControl |
Published Date: June 9, 2015 |
Last Revised Date: December 31, 2019

Solve the hover issue in date cell dropdown

When you try to hover on today’s date, the year is not shown properly. The hover issue can be seen in the following image.

For example, when the cursor hovers on today’s date, the 15 is not clearly seen in the 2015.

Show the date in cell dropdown

 

 

 

 



Solution

The month calendar control of the Windows Forms has the hover issue, by default. To solve this issue, set the ShowTodayCircle to False in the MonthCalendar by using the TableControlCurrentCellShowingDropDown event. Through this, the rectangle box disappears in today’s date.

C#

this.gridGroupingControl1.TableControlCurrentCellShowingDropDown += new Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlCurrentCellShowingDropDownEventHandler(gridGroupingControl1_TableControlCurrentCellShowingDropDown);
void gridGroupingControl1_TableControlCurrentCellShowingDropDown(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlCurrentCellShowingDropDownEventArgs e)
{
    //Checks whether the cell is month calendar or not.
    if (e.TableControl.CurrentCell.Renderer is GridDropDownMonthCalendarCellRenderer)
    {
        GridDropDownMonthCalendarCellRenderer de = e.TableControl.CurrentCell.Renderer as GridDropDownMonthCalendarCellRenderer;
        (de.DropDownContainer.Controls[0] as MonthCalendar).ShowTodayCircle = false;
    }           
}

VB

Private Me.gridGroupingControl1.TableControlCurrentCellShowingDropDown += New Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlCurrentCellShowingDropDownEventHandler(AddressOf gridGroupingControl1_TableControlCurrentCellShowingDropDown)
Private Sub gridGroupingControl1_TableControlCurrentCellShowingDropDown(ByVal sender As Object, ByVal e As Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlCurrentCellShowingDropDownEventArgs)
  'Checks whether the cell is month calendar or not.
  If TypeOf e.TableControl.CurrentCell.Renderer Is GridDropDownMonthCalendarCellRenderer Then
    Dim de As GridDropDownMonthCalendarCellRenderer = TryCast(e.TableControl.CurrentCell.Renderer, GridDropDownMonthCalendarCellRenderer)
    TryCast(de.DropDownContainer.Controls(0), MonthCalendar).ShowTodayCircle = False
  End If
End Sub

After applying the properties, the hover on the year is displayed as follows.

Show the date in cell dropdown

Samples:

C#: Hover_issueC#

VB: Hover_issueVB

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

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

Up arrow icon

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

Live Chat Icon For mobile
Live Chat Icon