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.

Override mouseover color at gridgroupingcontrol header with xp theme enabled

Thread ID:

Created:

Updated:

Platform:

Replies:

113848 Oct 11,2013 06:30 PM Nov 17,2013 11:25 PM Windows Forms 6
loading
Tags: GridControl
Leandro Pinto
Asked On October 11, 2013 06:30 PM

Hi

When xp theme is enabled at gridgroupingcontrol, on mouse over header,or stackedheader, the backcolor changes to orange. How can I overidde this color?

thanks

Leandro Pinto
Replied On October 15, 2013 11:01 AM

any suggestions?

Karuppasamy C [Syncfusion]
Replied On October 24, 2013 06:03 AM

Hi Leandro,

Thanks for your interest in Syncfusion Products.

you can  change the backcolor of the header cells by using the TableControlCellMouseHoverLeave
and TableControlCellMouseHover events.

Please use the following code:

void gridGroupingControl1_TableControlCellMouseHoverLeave(object sender, GridTableControlCellMouseEventArgs e)
        {
           
            if (this.gridGroupingControl1.TableModel[e.Inner.RowIndex, e.Inner.ColIndex].CellType == "ColumnHeaderCell")
            {
                this.gridGroupingControl1.TableModel[e.Inner.RowIndex, e.Inner.ColIndex].BackColor = color.Silver;
            }


        }

       
        void gridGroupingControl1_TableControlCellMouseHover(object sender, GridTableControlCellMouseEventArgs e)
        {
            if (this.gridGroupingControl1.TableModel[e.Inner.RowIndex, e.Inner.ColIndex].CellType == "ColumnHeaderCell")
            {
                this.gridGroupingControl1.TableModel[e.Inner.RowIndex, e.Inner.ColIndex].BackColor = Color.Black;
            }
          


        }


I hope these things resolve your issue.

Please let me know if you have any concerns.

Regards,

Karuppasamy C

Leandro Pinto
Replied On October 30, 2013 06:52 PM

It does not work.
The header keep showing the orange color from XP theme. :(

Athiram S [Syncfusion]
Replied On November 6, 2013 12:26 AM

Hi Leandro,

Thanks for your update.

You can make use of "SetMetroColor()" method and assign a specifix color for MouseHover.

Code:
this.gridGroupingControl1.SetMetroStyle(Color.Empty, Color.Red, Color.Empty, Color.Empty);

Please let me know if you have any concerns.

Regards,
Athiram S

Leandro Pinto
Replied On November 11, 2013 08:33 AM

Thanks for all suggestions.
I build my own theme implementing the interface IVisualStylesDrawing and works very well.

admin, you can close the topic.
thanks

Athiram S [Syncfusion]
Replied On November 17, 2013 11:25 PM

Hi Leandro,

Thanks for your update.

We are glad to know that the issue got resolved at your end.

Please let me know if you have any concerns.

Regards,
Athiram S

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.

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.

;