Change ColumnBackground at Runtime

3 posts, 1 answers
  1. John DeVight
    John DeVight avatar
    209 posts
    Member since:
    Jan 2010

    Posted 31 Jan 2013 Link to this post

    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. Answer
    Yoan
    Admin
    Yoan avatar
    1070 posts

    Posted 04 Feb 2013 Link to this post

    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.

  3. UI for WPF is Visual Studio 2017 Ready
  4. John DeVight
    John DeVight avatar
    209 posts
    Member since:
    Jan 2010

    Posted 04 Feb 2013 Link to this post

    Thanks Yoan.  I'll take a look at the CellStyleSelector.

    Regards,

    John DeVight
Back to Top