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

Prevent header text color form changing when moving mouse over

Thread ID:

Created:

Updated:

Platform:

Replies:

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

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 06:00 AM UTC

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.

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

;