Hi,
I have a FormView control with a MultiView control within it's
EditItemTemplate (because using a Wizard doesn't maintain two way data
binding - MS confirmed bug).
Any how, I have the requirement to save my data every time I change view of
my MultiView control. So I call FormView.UpdateItem()
This works fine, except for having the side effect of putting the
FormView.CurrentMode back to ReadOnly.
So I handle FormView.ModeChanging, and set FormViewModeEventArgs.Cancel=true
to cancel the mode change.
This is fine, except my MultiView control is back in it's original view.
The last time I can see it, the AcitveViewIndex is what I require it to be,
but then it ends up being wrong.
I feel like I'm missing an event opportunity, or it's simply too late to do
anything about it.
Anyone know?
Thanks
Martin
Martin - 27 Jun 2006 16:09 GMT
Got it
protected void FormView1_ItemUpdated(object sender, FormViewUpdatedEventArgs
e)
{
e.KeepInEditMode = true;
}
protected void MultiView1_PreRender(object sender, EventArgs e)
{
if (IsPostBack)
((MultiView)sender).ActiveViewIndex = viewno;
}
> Hi,
>
[quoted text clipped - 20 lines]
> Thanks
> Martin