I have this code, in which I read the data i deserialized in a gridview, let's name it FormReadDatabases
It gets populated like this:
xmlData = (xml.ServiceConfig)serializer.Deserialize(reader);
dataGridView1.DataSource = xmlData.Databases;
Then in each row of the grid I have a button 'Tables'
After I click it a new form appears FormReadTables
It gets populated like this:
BindingList<xml.Table> table = new BindingList<xml.Table>();
dataGridView4.DataSource = table;
Then I have a button which helps me add a new table, it works fine, the new row appears in the FormReadTables
, But when i close the form and I am now at the FormReadDatabases
if I click again on the Table button the changes are not saved.
Any idea how to avoid this?