I have a datagrid that is populated via XML file when the form loads. Everything is working great but I would like the datagrid to update dynamically when a new order is received (Separate class receives a data stream and updates the file).
Im looking for suggestions on how this should be done. (ie using a timer update every second, or monitor the file using FileSystemWatcher.. etc)
Since where here, I might as well mention that in order to update the datagrid Im clearing the whole data set and Re-reading the file using:
DataSet.Clear();
DataSet.ReadXml("file.xml");
dataGridView1.DataSource = DataSet;
if this is not the proper approach, please offer any alternate suggestions.