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

Change ColumnBackground at Runtime

2 Answers 50 Views
GridView
This is a migrated thread and some comments may be shown as answers.
John DeVight
Top achievements
Rank 1
John DeVight asked on 01 Feb 2013, 05:20 AM
I am able to set the ColumnBackground at design time in the XAML, but when I try to set the ColumnBackground at runtime when my Window is loaded, nothing happens.  For example:

myGrid.ColumnBackground = new SolidColorBrush(Colors.AliceBlue);

Is it possible to set the ColumnBackground at runtime?

2 Answers, 1 is accepted

Sort by
0
Accepted
Yoan
Telerik team
answered on 04 Feb 2013, 04:39 PM
Hello John,

I am afraid that you can not set GridView's property - ColumnBackground at runtime. I would recommend you to use the CellStyleSelector instead. 

Regards,
Yoan
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
John DeVight
Top achievements
Rank 1
answered on 04 Feb 2013, 11:13 PM
Thanks Yoan.  I'll take a look at the CellStyleSelector.

Regards,

John DeVight
Tags
GridView
Asked by
John DeVight
Top achievements
Rank 1
Answers by
Yoan
Telerik team
John DeVight
Top achievements
Rank 1
Share this question
or