Modifying font and backgroud of group by row in RadGridView

3 posts, 0 answers
  1. Nathan
    Nathan avatar
    3 posts
    Member since:
    Jun 2015

    Posted 15 Jul 2015 Link to this post

    I have a RadGridView that is using the group by functionality.

     When grouping by a column, the group by rows are created.

    I would like to change the font, background color, etc. of the group by row, but cannot figure out how. (They don't seem to take any formatting from the rows before the group by)


    Thank you.

  2. Dimitar
    Dimitar avatar
    1321 posts

    Posted 16 Jul 2015 Link to this post

    Hello Nathan,

    Thank you for contacting us.

    You can use the ViewCellFormatting event to style the cells in the group row. For example:
    Font myFont = new Font("Segoe Script", 10, FontStyle.Regular);
    void radGridView1_ViewCellFormatting(object sender, Telerik.WinControls.UI.CellFormattingEventArgs e)
        if (e.CellElement is GridGroupContentCellElement)
            e.CellElement.BackColor = Color.Red;
            e.CellElement.Font = myFont;
            e.CellElement.GradientStyle = Telerik.WinControls.GradientStyles.Solid;
            e.CellElement.DrawFill = true;
            e.CellElement.ResetValue(LightVisualElement.BackColorProperty, Telerik.WinControls.ValueResetFlags.Local);
            e.CellElement.ResetValue(LightVisualElement.GradientStyleProperty, Telerik.WinControls.ValueResetFlags.Local);
            e.CellElement.ResetValue(LightVisualElement.FontProperty, Telerik.WinControls.ValueResetFlags.Local);
            e.CellElement.ResetValue(LightVisualElement.DrawFillProperty, Telerik.WinControls.ValueResetFlags.Local);

    Detailed information about this is available in the following articles: 
    I hope this helps. Should you have any other questions do not hesitate to ask.
    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 Feedback Portal and vote to affect the priority of the items
  3. DevCraft R3 2016 release webinar banner
  4. Nathan
    Nathan avatar
    3 posts
    Member since:
    Jun 2015

    Posted 16 Jul 2015 in reply to Dimitar Link to this post

    That worked.

     Thank you.

Back to Top