Okay, I am doing a dataGrid that loads in an XML file and displays it on the screen by using the following...
Code:
private void loadButton_Click(object sender, System.EventArgs e)
{
mySet = LoadBooks( @"C:\Documents and Settings\Jay\Desktop\C#\pgm2\Books.xml" );
dataGrid.DataSource = mySet;
}
public DataSet LoadBooks( string strFileName )
{
DataSet loadSet = new DataSet();
loadSet.ReadXml( strFileName );
return loadSet;
}
That part works great. Here's the problem, I also have two text fields for the user to input a <TITLE> and an <AUTHOR>. I cant figure out how to do this and then update it on the screen in the dataGrid. I do not want to add the new book and author directly to the file as I have a save button that will end up doing that for me.
Here's the method prototype that my add book button click will call:
Code:
addBook( mySet, newTitle.Name, newAuthor.Name );