Problems passing data to ObjectDataSource
Posted on 2007-10-15
I have a fairly complex solution in order to combine a variety of Ajax Control Toolkit: ModalPopup with a TabContainer, as well as the usual GridView and DetailsView. The setup at a glance:
- GridView allowing for deletion and editing of rows, wrapped in an UpdatePanel.
- ModalPopup which is invoked when editing a row in gridview, and contains:
* a DetailsView which uses an objectDataSource to get the editable data.
* the DetailsView consists of a TemplateField with two tabs in a TabContainer, allowing for more fields to be edited in a limited space.
When I push the "Save"-button in my detailsView everything seems fine since the modalPopup closes and the gridview updates itself. But, the new row does not contain any data. Every string passed by my DetailsView is emtpy.
Do you know of any solutions?
I would like to add that everything worked when I only used simple HTML to design my DetailsView. The problem occured when I added the TabContainer - but, I really want the TabContainer as it becomes easier to use.
Some more details about my problem:
Usually when you create a DetailsView it accepts that you define the same ID for multiple objects (like TextBox) as long as they are situated in different states of the DetailsView (like EditItemTemplate and InsertItemTemplate). When I use the tabs, this is not allowed, although I create the a new tabContainer in in each state of the DetailsView, like this:
So why does it all of a sudden return error messages telling me that my site already contains a definition for 'name', when the definitions are created in different states of the DetailsView?
Well, the most crucial agenda is still to make my tabs-detailsview-modalpopup to send the data via my ObjectDataSource. Remember that a regular detailsview-modalpopup will send the data, but this doesn't give me the correct design/layout for my input.
I really need some advice...