This question is locked. New answers and comments are not allowed.
Hi Telerik Team,
I am currently using CellStyleSelector feature of a GridViewDataColumn to apply selective styles.
But styles are not being applied properly to few cells in middle when the grid is scrolled.
We bound the columns to the grid using _grid.Columns.AddRange(columns);
Rows are also added to the grid using _grid.ItemSource(rows).
I am creating MyStyleSelector.cs in following way
and applying it to the gridcolumn
I am currently using RadControls version 2010.2.714.1030. and Silverlight 3. Moving to silverlight 4 is not an option currently.
Any help would be appreciated.
Thank you.
I am currently using CellStyleSelector feature of a GridViewDataColumn to apply selective styles.
But styles are not being applied properly to few cells in middle when the grid is scrolled.
We bound the columns to the grid using _grid.Columns.AddRange(columns);
Rows are also added to the grid using _grid.ItemSource(rows).
I am creating MyStyleSelector.cs in following way
public class MyStyleSelector : StyleSelector { private static readonly Brush DefaultBackgroundBrush = new SolidColorBrush(Colors.Brown); public override System.Windows.Style SelectStyle(object item, System.Windows.DependencyObject container) { var style = new Style(typeof(GridViewCell)); var background = DefaultBackgroundBrush; style.Setters.Add(new Setter(GridViewCell.BackgroundProperty, background)); return style; } }and applying it to the gridcolumn
gridViewDataColumn.CellStyleSelector = App.Current.Resources["styleSelector"] as StyleSelector;I am currently using RadControls version 2010.2.714.1030. and Silverlight 3. Moving to silverlight 4 is not an option currently.
Any help would be appreciated.
Thank you.