I'm new to WPF and newer still to the WPF DataGrid. In a C# WinForms app. I added a DataSet to my project and then added several DataTables to that DataSet. Neither the DataSet nor the DataTables are linked to a DataBase. I have a DataGrid on my form
that has its DataSource set to my DataSet and the DataMember set to one of my DataTables. When I add data to my DataGrid and I want to save that data, I click a save button that simply writes the contents of my DataTable that is the DataMember of my DataGrid
to an xml file like this:
void btnSave_Click(object sender,
Its very simple and works great. So I decide I want to learn WPF and decide that I want to use the new WPF DataGrid in a test app. Well, I've managed to get a DataTable from my DataSet linked to a WPF DataGrid so I can see all the columns of the grid at
design time. However, I try writing the data to an xml file just like I did in my winforms project and nothing happens. I can't tell if the underlying DataTable isn't getting data or if the DataTable has the data but isn't writing it to my xml file. Can
anyone please help me to understand how I can make this work? Thank you!