How to use one ObjectContainerDataSource to populate and edit data in several data bound controls

Aug 13, 2007 at 2:12 PM
I am trying to use one ObjectContainerDataSource to populate data in several data bound controls (FormView, and two different GridViews). My application has one business entity for example Student. Student has many fields viz Name, Roll, RegeistrationID and
ClassesPassed , collection of classes he has studied and, Hobbies- set of hobbies he practicises.

I want to fetch information (Name, Roll, RegeistrationID) in formView , ClassesPassed in first gridView and , Hobbies in the second grid in same time on a web page.
After this I want to edit all data bound controls in one go by updating it through SAVE button click event. How this button click event will trigger ObjectContainerDataSource_Update event handler method as written bellow. How will parameter e have all to be updated information? Please help

On SAVE button click event , event handler method responded is

protected void saveButton_Click(object sender, EventArgs e)
{
}

How to get this StudentContainerDataSource_Updated event handler method in this application. How will parameter e have all to be updated information?

protected void StudentContainerDataSource_Updated(object sender, ObjectContainerDataSourceStatusEventArgs e)
{
_presenter.CallUpdateStudent((Student)e.Instance);
}
Thanks in advance

Alok