Решение оказалось таковым.
private void initializeTimer()
{
var dispatcherTimer = new System.Windows.Threading.DispatcherTimer();
dispatcherTimer.Tick += new EventHandler(dispatcherTimer_Tick);
dispatcherTimer.Interval = new TimeSpan(0, 0, 5);
dispatcherTimer.Start();
}
private void dispatcherTimer_Tick(object sender, EventArgs e)
{
Companies.companies.Clear();
Companies.Get();
grid.Items.Refresh();
}
static class Companies
{
public static System.Data.DataSet companies = new System.Data.DataSet();
public static System.Data.DataView Get()
{
User.connect.Open();
MySqlCommand cmd = new MySqlCommand("SELECT * FROM data", User.connect);
MySqlDataAdapter adapter = new MySqlDataAdapter();
adapter.SelectCommand = cmd;
adapter.Fill(companies);
User.connect.Close();
return new System.Data.DataView(companies.Tables[0]);
}
}