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

Change a cells background color

1 Answer 68 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Jonathan
Top achievements
Rank 1
Jonathan asked on 19 Apr 2012, 08:49 PM
I am trying to make the background color of the first row in my grid blue. here is what I am trying in c#.

 for (int i = 0; i < rgvAlarmLog.ColumnCount; i++)
                            {
                                rgvAlarmLog.Rows[rowCount].Cells[i].Value = HeaderRowSplit[i];
                                rgvAlarmLog.Rows[rowCount].Cells[i].Style.BackColor = System.Drawing.Color.Black;
                            }

I have another loop that goes through the rows and that is the rowcount variable. There is no visible color change when I do this. What am I doing wrong? It is a radgridview object. I have looked at similar post and tried their code to no avail. Any advice? Thanks

1 Answer, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 20 Apr 2012, 07:05 AM
Hello,

 We do not have such API for RadGridView for WPF. Are you sure you are using our WPF components?

Regards,
Vlad
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
GridView
Asked by
Jonathan
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Share this question
or