This is a migrated thread and some comments may be shown as answers.

[Solved] RadGridView Header Color On Filter

4 Answers 245 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Ricky
Top achievements
Rank 1
Ricky asked on 29 Jun 2011, 04:52 PM
I am trying to achieve RadGridView Headers to be red on filtering (I have accomplished this successfully in the code-behind). Unfortunately, the red foreground color doesn't apply when the column is sorted, and I am at a lost as to how to accomplish this with the code-behind.

Is there a better way to change the RadGridView Header foreground color that applies to filtered headers for both unsorted and sorted columns?

4 Answers, 1 is accepted

Sort by
0
Vanya Pavlova
Telerik team
answered on 30 Jun 2011, 08:02 AM
Hello Ricky,

 
You may take a look at the following foprum thread "Apply Custom Style To A Filtered Column".


Regards,
Vanya Pavlova
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Ricky
Top achievements
Rank 1
answered on 30 Jun 2011, 02:04 PM
Hello Vanya,

Thank you very much for your reply!

I am currently using the approach described on the bottom of that forum post you linked. While all of these solutions allow for the column header's color to change based on filtering, the color returns to its default upon sorting a filtered column.

To be clear: The column header color turns red when filtered. If a column is filtered then sorted, the color of the column header returns to the default color (as if it was never filtered). This effect is undesirable due to possible confusion to users.

How can I change the column header's foreground color to red when it is filtered & sorted?

Any help is greatly appreciated.

-Ricky
0
Accepted
Vanya Pavlova
Telerik team
answered on 04 Jul 2011, 08:12 AM
Hi Ricky,

 

A possible approach in this case is to alter the appearance of GridViewHeaderCell's template within its corresponding states related to the sorting-Ascending/Descending/Normal. You have to apply the same style in code-behind when you perform filtering. You may read more about this in our online documentation, please follow this link. 


Kind regards,
Vanya Pavlova
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Ricky
Top achievements
Rank 1
answered on 12 Jul 2011, 03:03 PM
Thank you!
Tags
GridView
Asked by
Ricky
Top achievements
Rank 1
Answers by
Vanya Pavlova
Telerik team
Ricky
Top achievements
Rank 1
Share this question
or