G
Guest
I've been trying to figure out how the client of a DetailsView or
FormView should handle the ItemUpdating event when setting the datasource
programatically. I want to do something simple like this:
formView.DataSource = new SomeUserObject[] { user };
formView.DataBind();
All the examples i've come across show a declerative data source being
used. Do i need to use ObjectDataSource? I can get the information going
through the cells by parsing the html but that smells funny.
the FormViewUpdateEventArgs always has the OldValues and NewValues
collection empty.(Keys is too). ModeChanging behaves differently when setting
the data source explicitly(documented in the docs) but i can't find anything
for the ItemUpdating event.
I can't seem to get the edited values. I feel i'm missing something simple
but i'm just not sure what! Maybe somehow i need to populate the NewValues
and OldValues myself?
FormView should handle the ItemUpdating event when setting the datasource
programatically. I want to do something simple like this:
formView.DataSource = new SomeUserObject[] { user };
formView.DataBind();
All the examples i've come across show a declerative data source being
used. Do i need to use ObjectDataSource? I can get the information going
through the cells by parsing the html but that smells funny.
the FormViewUpdateEventArgs always has the OldValues and NewValues
collection empty.(Keys is too). ModeChanging behaves differently when setting
the data source explicitly(documented in the docs) but i can't find anything
for the ItemUpdating event.
I can't seem to get the edited values. I feel i'm missing something simple
but i'm just not sure what! Maybe somehow i need to populate the NewValues
and OldValues myself?