I've databound some data to a datagrid and I'm wanting to be able to get the original data back.
I've databound the data as follows in one section of my code.
IEnumerable<MyClass> myClasses = GetMyClassesFromDatabase();
DataGridForMyClass.DataSource = myClasses;
DataGridForMyClass.DataBind();
When I've clicked a button, I want to be able to do stuff with the items in the datagrid.
How do I, given the DataGridForMyClass, retrieve the original list of MyClass?