Formatting Cell + selected Row

2 posts, 0 answers
  1. Tony
    Tony avatar
    10 posts
    Member since:
    Mar 2015

    Posted 10 Aug 2015 Link to this post

    Hi everyone,

    I used the CellFormatting event to Format all cell's Background and border.

    So, when i click on a cell, I don't see the selected row/cell.


    Is there any way to set an higher priority to the selected cell/row than the cell formatting ?


    Thanks in advance.


    Best regards,


  2. Stefan
    Stefan avatar
    2906 posts

    Posted 10 Aug 2015 Link to this post

    Hello Tony,

    Thank you for writing.

    Local settings introduced to properties in the CellFormatting event have higher priority than the theme settings for the highlighting. What I would suggest is to also style the selection color in the CellFormatting event:
    private void RadGridView1_CellFormatting(object sender, Telerik.WinControls.UI.CellFormattingEventArgs e)
        e.CellElement.DrawFill = true;
        e.CellElement.BackColor = Color.Red;
        if (e.Row.IsSelected)
            e.CellElement.BackColor = Color.Yellow;

    I hope this helps.

    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
Back to Top