开发者

DataSourceView.ExecuteUpdate with GridView

I'm defining my own DataSourceControl and DataSourceView.

The load and display of collection in开发者_StackOverflow社区 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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜