Hi Andrew,
Sorry for late reply. I was consulting this question recently.
First, the problem appears to be that the FormView is told by the data
source control that the data has changed, and therefore it should rebind to
get the new data. This actually should not have been done since we're still
in Insert mode. I have got a workaround for your reference: Inherit from
FormView to create your own FormView control, override
OnDataSourceViewChanged and set RequiresDataBinding to false if we're in
Insert mode:
public class MyFormView : FormView
{
protected override void OnDataSourceViewChanged(object sender,
EventArgs e)
{
if (this.CurrentMode == FormViewMode.Insert)
{
this.RequiresDataBinding = false;
}
else
{
base.OnDataSourceViewChanged(sender, e);
}
}
}
I've tested it on my side and it seems working correctly. Please give it a
try and let me know the result.
By the way, I don't think making the page invalid is good idea to
workaround the issue here,
Regards,
Walter Wang (
[email protected], remove 'online.')
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.