Thanks for writing and for the provided code snippet.
Based on what I have seen from your code, I assume that the undesired behavior that you experience is related to the fact that you set the BackColor
property of the GridViewElement
which, basically, changes the background color of the whole RadGridViewElement.
If you wish to change the background color of the Header Row,
you should use the following approach:
|void radGridView1_GroupSumaryEvaluate(object sender, GroupSummaryEvaluationEventArgs e)
| e.Group.HeaderRow.VisualElement.DrawFill = true;
| e.Group.HeaderRow.VisualElement.BackColor = Color.Red;
As you can see, I set the DrawFill
property of the Header Row' Visual Element
(the element that represents the visual part of a header row)
in order to make the fill visible (initially the fill is hidden because of some performance considerations). I also set the BackColor
property of the VisualElement
according to my preferences. You should also note that, if you want to have a gradient background you should also use the BackColor2, BackColor3
properties to build your gradient. The NumberOfColors
property defines how many colors are used for your gradient. The maximum number is 4.
If you do not want to have a gradient background, you should only use the BackColor
property and set the GradientStyle
property to Solid.
I hope this is helpful.
Do not hesitate to write back if you need further assistance.
the Telerik team