How do you set the style for all cells in an autogenerated GridView in a designer friendly manner?
ItemContainerStyle has no effect.
it is possible to handle Columns.CollectionChanged and set Column.CellStyle there, but that approach requires code behind and is invisible at design time.
2 Answers, 1 is accepted
0
Vanya Pavlova
Telerik team
answered on 08 Apr 2013, 02:14 PM
Hello Martin,
As a rule of thumb if you want to apply a style to all cells in RadGridView you may define an implicit style targeted at GridViewCell, which will be applied to all cells in your grid. An implicit style is the one, which do not require to specify an x:Key attribute. Setting a cell style through the CellStyle property of the column requires a key and should be set manually to the columns you need. Since you need to have design time support the best option here is to define an implicit style in XAML, as shown below: