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. Image for the cookie policy date

Override mouseover color at gridgroupingcontrol header with xp theme enabled

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

6 Replies

LP Leandro Pinto October 15, 2013 03:01 PM UTC

any suggestions?


KC Karuppasamy C Syncfusion Team 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


LP Leandro Pinto October 30, 2013 10:52 PM UTC

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


AS Athiram S Syncfusion Team 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


LP Leandro Pinto 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


AS Athiram S Syncfusion Team 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

Loader.
Live Chat Icon For mobile
Up arrow icon