We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

GridDataControl Rows Not Updated via IPropertyNotifyChanged When Scrolled Out of View

I have a GridDataControl that is bound to an ObservableCollection<T> where T is a row model that implements INotifyPropertyChanged.

The collection has about 600 items in it. I have one operate that updates all 600 rows at once. I have verified that the change notification is occurring as expected on all rows. The visible rows are updating properly and I immediately see the bound column update. When I scroll the grid to bring some other rows into view, they still display the visible value, until I pass the mouse over the top of those rows (almost like a magic wand) and then the values update.

Is there some setting that I need to make on the GridDataControl xaml? Or there some code-behind method or event I need to invoke?

Here's the grid definition:
       <sf:GridDataControl x:Name="ItemsGrid"
                            ItemsSource="{Binding Path=Items}"
                            UpdateMode="PropertyChanged"
                            NotifyPropertyChanges="True"
                            AutoFocusCurrentItem="False"
                            AutoPopulateColumns="False"
                            AutoPopulateRelations="False"
                            EnableVisualStyleForEditors="True"
                            EnableContextMenu="True"
                            ShowHoveringBackground="True"
                            ShowAddNewRow="False"
                            ShowFilters="True"
                            AllowEdit="True"
                            AllowDelete="False"
                            AllowDragColumns="True"
                            AllowGroup="True"
                            AllowResizeColumns="True"
                            AllowSelection="Multiple"
                            AllowSort="True"
                            SelectFirstRowOnLoad="False"
                            ListBoxSelectionMode="MultiExtended"
                            CopyPasteOption="IncludeHeaders"
                            IncludeHeaderTextOnCopy="True"
                            NotifyComplexPropertyChanges="True"
                            UsePLINQ="True">

Here's a row definition:
                <sf:GridDataVisibleColumn HeaderText="Side"
                                          MappingName="Side"
                                          Width="60"
                                          ColumnStyle="{StaticResource ReadOnlyColumnStyle}" />

        <sf:GridDataColumnStyle x:Key="ReadOnlyColumnStyle"
                                IsEditable="False"
                                ReadOnly="True" />



Syncfusion verion:
Type: Syncfusion.Windows.Tools.Controls.HierarchyNavigator
Assembly: Syncfusion.Tools.Wpf, Version=10.404.0.53, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89
Assembly location: C:\Program Files (x86)\Syncfusion\Essential Studio\10.4.0.53\assemblies\4.0\Syncfusion.Tools.Wpf.dll


5 Replies

JG Jai Ganesh S Syncfusion Team September 30, 2016 10:02 AM UTC

Hi sgillbee, 
We have checked your reported issue by creating the simple sample and update the values but we are unable to reproduce the issue. 
private void Button_Click(object sender, RoutedEventArgs e) 
 { 
    var collection = (this.DataContext as ViewModel).GDCSource; 
 
    foreach (var item in collection) 
    { 
       item.EmployeeName = "Sync"; 
    } 
} 
 
Could you please share the code or modify the above sample for how you updated the rows? This would be more helpful for us to analyze further. 
Regards, 
Jai Ganesh S 



SG sgillbee September 30, 2016 02:44 PM UTC

I have slightly modified your sample application and can easily reproduce the problem. Please see the attached zip file (which includes compiled binary files) and follow the instructions below.


1.      Launch application from attached sample:
GDCDemo\GDCHyperLinkSample\bin\Debug\GDCHyperLinkSample.exe

2.      Select “Male” from Gender combo on right side. Notice all visible rows change to “Male”

3.      Drag vertical scrollbar slowly to the bottom. Slow enough that you can see all the rows as they scroll by. In this case, all rows updated and displayed properly. Often, the first change is okay (though not always).

4.      Change the Gender pulldown to “Female”. Notice all visible rows change to “Female”.

5.      Slowly scroll up by dragging the vertical scroll bar. Notice in this case that some of the rows still show as “Male”. Sometimes dragging quickly instead of slowly helps. Sometimes not. Flip back and forth between “Male” and “Female”, scrolling the grid between each change and eventually the problem with manifest.