c# - Slow WPF 4 Datagrid Refresh -


i using wpf datagrid component .net 4 framework, bound thread safe observable collection found here : http://www.deanchalk.me.uk/post/thread-safe-dispatcher-safe-observable-collection-for-wpf.aspx

the program system admin tool pings each ip address in range, if there response creates object in collection details computer.

the problem having, poor performance. initially, updating collection , letting datagrid pick changes. caused issue datagrid control wasn't refreshing , showing data unless scrolled.

so added timer call grids refresh method, timer ticks every 750ms. worked brilliantly, until realised programs ui unresponsive while timer enabled , scanning.

without timer, performance acceptable, without it, terrible. have tried several values timeout period (up 2000ms) without luck , have made sure columns fixed width (i read autogenerated columns , widths can cause performance issues).

the amount of row's in grid 300 - 400 5 columns, not huge grid.

does have suggestions of how grid update in timely manner when collection behind added to, without sacrificing performance?

if bindings correct won't need refresh datagrid manually. updating observable collection behind scene should automatically trigger(assuming have implemented notifypropertychanged) update of datagrid. 300 - 400 not number slow down datagrid. datagrid inside scrollviewer? degrades performance well. make sure bindings working fine won't need manual refresh.


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -