views:

94

answers:

1

I'm defining my own DataSourceControl and DataSourceView.

The load and display of collection in the GridView works perfectly, however, when I click Update (after clicking Edit to Edit a row), the values collection which comes through as the second parameter to ExecuteUpdate in my DataSourceView is populated with the old values as is oldvalues collection.

Anybody experienced similar issues, or is there something I am missing?

Thanks.

A: 

In your Page.Load event handler, do you have code similar to the following?

If (!this.IsPostBack) DataBind();

Because this sounds like a databinding issue, where your database data has been re-applied to the grid and so your grid has lost all of the edited data it received from the user's postback. If the grid is being re-databound during the Page.Load event, it would probably produce the behaviour you're describing.

Rabid
D'oh didn't notice the ask time.
Rabid