473,378 Members | 1,344 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Controlling MultiView ActiveViewIndex after FormView Mode change

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
Jun 27 '06 #1
1 3224
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;

}

"Martin" <x@y.z> wrote in message
news:On**************@TK2MSFTNGP03.phx.gbl...
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

Jun 27 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: coli | last post by:
When I place a FormView that is default to insert mode inside a MultiView's View Control, nothing get's displayed. It worked fine though when it's outside the MultiView.
0
by: MasterChief | last post by:
I have a multiview located inside of a formview under the edit item template. I set the Default mode to Edit mode. When I click Update it goes back to the edit view but the multiview doesn't show...
0
by: Avon | last post by:
Hi friends, I am very sorry for my not perfect English. I have one question, I am using David Bauer's DynamicControlsPlaceholder to dinamically generate controls and I am tryig to generate...
0
by: veerleverbr | last post by:
Hi, I want to create an asp.net page with a tabpage. On the tabpage I want to use the WebDateChooser and WebDataInput controls of Infragistics. These 2 controls use a mask to enter a date and...
3
by: Mat | last post by:
Can a multiview be controlled manually from the screen?
0
by: Jacob Donajkowski | last post by:
Once the user logs in I want to have the users switch from the Roster View to the Profile View and enter their profile infomation and save it. Then the next time they login and go to the Profile...
0
by: cvijaykrishna | last post by:
i am having a web based application and i am having a problem with it pls check it Explanationi am sending a sample code plese see it in VS-2005 FOR BETTER UNFERSTANDING I have a main page...
1
by: Nathan Sokalski | last post by:
When I include a MultiView control in my application, I receive the following error: MultiView cannot have children of type 'Label'. It can only have children of type View. I receive the...
2
by: pbd22 | last post by:
Hi. Has anybody seen this? I have three views in a multivew: <asp:MultiView runat="server" ID="multiView" ActiveViewIndex="0"> <asp:View runat="server" ID="loginView"> and so on.
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.