Articles in this section

How to change color of linklabel mousehover in WinForms GridGroupingControl?

Change the color of link label


The color of the LinkLabelCell on mouse hover can be changed by using the ActiveLinkColor property and the LinkLabelCellRenderer class. The LinkLabelCellRenderer has been taken from the CellRenderers collection of the WinForms GridControl feature tour pageThe following code example shows how to set the LinkLabelCell’s ActiveLinkColor.

C#

LinkLabelCellRenderer rend = this.gridControl1.CellRenderers["LinkLabelCell"] as LinkLabelCellRenderer;
//Sets the LinkLabelTextColor (mousehover color to remain as no color).
rend.ActiveLinkColor = Color. Red;
VB
Dim rend As LinkLabelCellRenderer = TryCast(Me.gridControl1.CellRenderers("LinkLabelCell"), LinkLabelCellRenderer)
'Sets the LinkLabelTextColor (mousehover color to remain as no color).
rend.ActiveLinkColor = Color. Red

Show the link label in cell

Figure 1: Link Label Cell


Note:

You can achieve the same by using the GridDataBoundGrid and GridGroupingControlThe following code example can be used to get the LinkLabelCellRenderer from the CellRenderers collection of the GridGroupingControl and GridDataBoundGrid, and vice versa.


C#

//Gets the CellRenderer in the GridDataBoundGrid.
LinkLabelCellRenderer rend1 = this.griddataboundgrid1.CellRenderers["LinkLabelCell"] as LinkLabelCellRenderer;
//Gets the CellRenderer in the GridGroupingControl.
LinkLabelCellRenderer rend1 = this.gridGroupingControl1.TableControl.CellRenderers["LinkLabelCell"] as LinkLabelCellRenderer;
VB
'Gets the CellRenderer in the GridDataBoundGrid.
Dim rend1 As LinkLabelCellRenderer = TryCast(Me.griddataboundgrid1.CellRenderers("LinkLabelCell"), LinkLabelCellRenderer)
'Gets the CellRenderer in the GridGroupingControl.
Dim rend1 As LinkLabelCellRenderer = TryCast(Me.gridGroupingControl1.TableControl.CellRenderers("LinkLabelCell"), LinkLabelCellRenderer)
Conclusion


I hope you enjoyed learning about how to change color of linklabel mousehover in WinForms GridGroupingControl.


You can refer to our WinForms GridControl feature tour page to know about its other groundbreaking feature representations. You can also explore our WinForms GridControl 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)
Access denied
Access denied