This question is locked. New answers and comments are not allowed.
I tried upgrading to 2011 Q1 SP1 again today, but was forced to regress again because of a change in functionality.
Here's the situation:
A hierarchial grid, and I want to change the expand button to indicate that there are child elements. So, I tie into the cellstyle selector using
with the following code behind
In 2010 Q3 SP1 this code gets called everytime the underlying data is changed... say I have a function that sorts the rows.
In 2011 Q1 SP1 this code only gets called when the grid is loaded.
I've even used a .Rebind() with no luck.
Here's the situation:
A hierarchial grid, and I want to change the expand button to indicate that there are child elements. So, I tie into the cellstyle selector using
HierarchyExpandButtonStyleSelector="{StaticResource cellStyleSelector}"with the following code behind
Public Class MyCellStyleSelector Inherits StyleSelector Public Overloads Overrides Function SelectStyle(item As Object, container As System.Windows.DependencyObject) As System.Windows.Style Dim style As New Style(GetType(GridViewToggleButton)) Dim backgroundBrush As New LinearGradientBrush() Dim foregroundBrush As New SolidColorBrush() Dim borderBrush As New LinearGradientBrush() backgroundBrush = Application.Current.Resources("GridView_PopulatedToggleButtonBackground") foregroundBrush = Application.Current.Resources("GridView_PopulatedToggleButtonForeground") borderBrush = Application.Current.Resources("GridView_PopulatedToggleButtonBorder") Dim CurrentRowData As BillComponent = TryCast(item, BillComponent) If CurrentRowData IsNot Nothing Then If CurrentRowData.ReferenceDesignators IsNot Nothing AndAlso CurrentRowData.ReferenceDesignators.Count > 0 Then style.Setters.Add(New Setter(GridViewCell.BackgroundProperty, backgroundBrush)) style.Setters.Add(New Setter(GridViewCell.ForegroundProperty, foregroundBrush)) style.Setters.Add(New Setter(GridViewCell.BorderBrushProperty, borderBrush)) End If End If Return style End FunctionIn 2010 Q3 SP1 this code gets called everytime the underlying data is changed... say I have a function that sorts the rows.
In 2011 Q1 SP1 this code only gets called when the grid is loaded.
I've even used a .Rebind() with no luck.