J
Jussi
I load a XML document in the DataGrid:
private System.Windows.Forms.DataGrid myDataGrid = new DataGrid();
private DataSet m_myDataSet = new DataSet();
m_myDataSet.ReadXml(@"C:\...\MyDocument.xml");
myDataGrid.DataSource = m_myDataSet;
This works fine and user can edit the loaded document. The problem is that I
don't want to give possibility to change the structure of the
MyDocument.xml. User should only change data in the already existing fields.
In the DataGrid user can create for example new rows and these are saved to
the MyDocument.xml when
m_myDataSet.WriteXml(@"C:\...\MyDocument.xml");
is done and MyDocument.xml is corrupted. Is there a way to avoid this?
-JK
private System.Windows.Forms.DataGrid myDataGrid = new DataGrid();
private DataSet m_myDataSet = new DataSet();
m_myDataSet.ReadXml(@"C:\...\MyDocument.xml");
myDataGrid.DataSource = m_myDataSet;
This works fine and user can edit the loaded document. The problem is that I
don't want to give possibility to change the structure of the
MyDocument.xml. User should only change data in the already existing fields.
In the DataGrid user can create for example new rows and these are saved to
the MyDocument.xml when
m_myDataSet.WriteXml(@"C:\...\MyDocument.xml");
is done and MyDocument.xml is corrupted. Is there a way to avoid this?
-JK