.net - How to filter on a constantly updated collection displayed in grid? -
Assume that I have a WPF application that shows "Questions", there are different statuses of questions, such as " Open ", and" answer "questions are stored in an inspection collection and appear on a DataGrid
I have a toggle button Which has to switch between "open" and "answer" questions. When a user clicks on the "open" button, the grid should only show open question, and when a user clicks on the "Answered" button, then he should show only the answered question.
These objects are constantly being updated Second thread (every second) Additionally, their status can be replaced by another thread, and the grid will need to be updated.
What's a good way to filter this collection? Right now I am using ICollectionView and Calling Refresh () when any question situation changes, but due to refresh the "AddItem / EditItem" transaction I get errors.
Thank you.