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.

6.      Click on one of the Male cells. It immediately changes to “Female”.



Attachment: GDCDemo60976651Modified_ba94c7d1.zip


JG Jai Ganesh S Syncfusion Team October 3, 2016 11:59 AM UTC

Hi sgillbee, 
 
The reported issue was reproduced in 10.4 version but it has been fixed after 11.3 version. Could you please install our latest Version 14.3.0.49 and is available for download under the following link? 
 
 
In our latest version you can use SfDataGrid. This is like GridDataControl. But compare to GridDataControl, SfDataGrid having a better performance and flexibility. SfDataGrid assists you to create entirely customizable and highly interactive features used to display and manipulate the huge amount of data. So, we suggest you to use SfDataGrid instead of GridDataControl.

You can also refer the below documentation link to know more about SfDatagrid, 
 
  
Could you please let us know if you want a patch in 10.4 version? 
 
Regards, 
Jai Ganesh S 
 
 



SG sgillbee October 3, 2016 03:11 PM UTC

Unfortunately, it is not possible for us to upgrade from 10.4 at this time... the undertaking would be massive and does not fit into any project schedules for at least the next 2 years.

A 10.4 hotfix *may* be a possibility, but even that may be prohibitively different. There are good reasons why we are still on 10.4.

Another option could be for me to manually trigger an update for rows as they become visible? I've seen the grid.Model.RefreshWholeRow property which I've verified repaints the entire row if a single value changes while a row is visible. That would seem to indicate that there is a mechanism where a row can be manually refreshed.

Can you tell me if there is a method/property/event I can use to (a) detect when a row becomes a visible and (b) can invalidate/refresh the entire row?

At this point I'll even take internal/private methods which I can use reflection to invoke.


JG Jai Ganesh S Syncfusion Team October 4, 2016 01:23 PM UTC

Hi sgillbee, 
A support incident to track the status of this forum has been created under your account. Please log on to our support website to check for further updates 
Regards, 
Jai Ganesh S 
 


Loader.
Live Chat Icon For mobile
Up arrow icon