Articles in this section
Category / Section

How to solve hover issue in WinForms GridGroupingControl?

1 min read

Solve the hover issue in date cell dropdown

When you try to hover on today’s date, the year is not shown properly in WinForms GridGroupingControl. 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.

Displaying date in WinForms GridGroupingControl

Solution

The month calendar control of the Windows Forms has the hover issue, by default. You can solve this issue by setting the ShowTodayCircle to False in the MonthCalendar by using the TableControlCurrentCellShowingDropDown event in WinForms GridGroupingControl.

 

 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

 

Conclusion

I hope you enjoyed learning about how to solve hover issue in WinForms GridGroupingControl.

You can refer to our  WinForms GridGroupingControl feature tour page to know about its other groundbreaking feature representations. You can also explore our WinForms GridGroupingControl documentation to understand how to create and manipulate data.

For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.

If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forumsDirect-Trac, or feedback portal. We are always happy to assist you!

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied