CollectionVIew and DeferRefresh

Posted by: egor.kachiguine on 5 April 2019, 4:17 am EST

  • Posted 5 April 2019, 4:17 am EST

    Dut does FlexGrid come with a CollectionView implementation that supports deferring updates on inserts, etc? The native Microsoft one doesn't, but it seems like many DataGrid vendors roll their own.

    What is your recommendation for improving performance with bulk inserts?
  • Marked as Answer

    Replied 7 April 2019, 5:42 pm EST

    Hi Egor,

    WPF FlexGrid internally uses Microsoft's ListCollectionView which does not provide deferring updates support. However, FlexGrid provides DeferNotifications() method for RowColCollection which can be used in update blocks to perform batch updates efficiently and safely. It can be used as follows:

    var rows = _flexGrids.Rows;
    using (rows.DeferNotifications())
    //Perform Data updates/inserts

    and notifications will be restored after exiting the using block(i.e. by disposing the IDisposable object returned by DeferNotifications method).

    Please refer the attached sample( for the same and let me know if it does not help.

    Thanks and Regards,
  • Replied 1 May 2019, 12:11 pm EST

    Thank you so much, sorry I missed this (rolled my own defer-friendly collectionView, but going to try out your implementation as well).
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels