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

Override mouseover color at gridgroupingcontrol header with xp theme enabled

Thread ID:

Created:

Updated:

Platform:

Replies:

113848 Oct 11,2013 10:30 PM UTC Nov 18,2013 04:25 AM UTC WinForms 6
loading
Tags: GridControl
Leandro Pinto
Asked On October 11, 2013 10:30 PM UTC

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 03:01 PM UTC

any suggestions?

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

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 10:52 PM UTC

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

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

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 01:33 PM UTC

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 18, 2013 04:25 AM UTC

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.

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

;