Search code examples
c#wpfdatagridrefresh

How Can I refresh my Datagrid on WPF automatically for every 1 minute?


I want to be able do refresh my datagrid, because I am updating my table on my database datagrid and want to see the changes in grid , is there any way of automatically updating datagrid for every 1 minute?


Solution

  • DataGrid.Items.Refresh() will refresh the items. You can then use a timer to run every minute to force the refresh

    Here is an example of implementing a timer to update a ListBox which you can adapt for your purpose.