Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
200
INotifyPropertyChanged invalidates entire grid
posted

I guess my first question should be, when I bind to a BindingList of objects that implement INotifyPropertyChanged, and the PropertyChanged event gets fired, should this be invalidating the entire viewable grid or only the row that fired it?

My current implementation is updating a grid using an event that call UltraGridRow.Refresh() after a property has changed, but this will not update any summaries i have in my grid.  A call to SummarySetting.Refresh() causes UI hickups when i call them every second( i have about 15 summarie ).  I was hoping that implementing INotifyPropertyChanged would aleviate the need to call SummarySetting.Refresh() (it has) but it has also slowed the performance of my realtime data grid down to the point where it has become unsuable because the entire viewable are of my grid is being invalidated with each PropertyChanged event that gets fired.

 Any ideas?

 

Thanks,

-Steve

Parents
  • 469350
    Verified Answer
    Offline posted

    Hi Stephen, 

    The grid doesn't know anything about INotifyPropertyChanged. If this is having any effect at all, it must be because the BindingManager is looking for this and firing ListChanged notifications to the grid.the grid should only be refreshing what it needs to, but this is based on the notifications it is getting. If the BindingManager is sending a Reset notification, then the grid has to throw away the whole layout and re-build everything. If if's just an ItemChanged, then the grid would only refresh the individual row and the summaries affected by the values in that row.

    There are probably ways you can make your grid more efficient, but it's really hard to say what they might be without knowing exactly what features of the grid you are using. 

    One thing you may want to do is check out the CellDisplayStyle property on the column. this property allows you turn off certain features of a column that you know you are not using. 

    Another thing to do would be to wrap your updating code inside a BeginUpdate/EndUpdate block. This will stop the grid from painting during the update, so you can potentially reduce multiple paint operations down to one. 

Reply Children