How can I update my Datagrid to WPF automatically every 1 minute?

I want to be able to update my datagrid because I am updating the table in my datagrid database and want to see the changes in the grid, is there a way to automatically update the datagrid every 1 minute?

+3
source share
2 answers

DataGrid.Items.Refresh() update the elements. Then you can use timer to start every minute to force update

Here is an example implementation of a timer for updating a ListBox that you can adapt for your purpose.

+10
source

Forward, you can use ObservableCollection to snap the grid to avoid manual updates.

+3
source

Source: https://habr.com/ru/post/1496631/


All Articles