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.

Prevent header text color form changing when moving mouse over

Thread ID:

Created:

Updated:

Platform:

Replies:

100764 Sep 2,2011 02:28 PM Sep 10,2011 02:00 AM ASP.NET Web Forms (Classic) 1
loading
Tags: GridGroupingControl
johnny
Asked On September 2, 2011 02:28 PM

Hello, I'm having a problem with header text color.

Here is what I have.

private void gridControl1_QueryCellInfo(object sender, GridQueryCellInfoEventArgs e)
{
if (e.RowIndex == 0)
{
e.Style.TextColor = Color.White;
}
else if (e.ColIndex == 0)
{
e.Style.TextColor = Color.White;
}
}


The text is changing to white however when moving the mouse over the headers the text turns to black. What is causing this and how can I prevent it?
Thanks



Asarudheen S [Syncfusion]
Replied On September 10, 2011 02:00 AM

Hi Johnny,

Thank you for your interest in Syncfusion products.

You can prevent header text color from changing when moving mouse over by setting “e.Style.Clickable = false” in the event .Please refer the following code to achieve the behaviour.


void gridControl1_QueryCellInfo(object sender, GridQueryCellInfoEventArgs e)
{
if (e.RowIndex == 0)
{
e.Style.TextColor = Color.White;
e.Style.Clickable = false;


}
else if (e.ColIndex == 0)
{
e.Style.TextColor = Color.White;
e.Style.Clickable = false;

}
}


Here is the sample for your reference.

http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=1007641319004667.zip

Please let us know if you need any further assistance.

Regards,
Asarudheen.




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.

;