Rank: Newbie Groups: Member
Joined: 4/14/2008 Posts: 2
|
I am trying to use a eo:grid in a step of a microsoft wizard control. The web control seems to hold data to the next step but loses all data when I get to the finish button.
Steps to recreate.
1. Set up a page with a wizard control wiht at least 4 steps. 2. on the first step add a eo:grid control. 3. the second step can be anything. 4. the third step has the finish cutton (Making it a finish step type) 5. the forth step is the complete step.
When I change steps I can use the ActiveStepChanged method of the wizard and see and access information entered in the grid in step 1.
If I hit previous step or move on to the next step the grid somehow resets and contains no data.
The data is still not here when they hit the finish button.
I need to maintain the data until the end of the wizard and not do anything with it until tghey finish the wizard in case they cancel or quit the wizard.
Any help you can give on this would be helpfull
Thanks Scott Schulze
My code that shows me the status between steps is below.
Protected Sub Ownership_Wizard_ActiveStepChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Ownership_Wizard.ActiveStepChanged
If gr_Party_Owners.Items.Count >= 1 Then MsgBox(Ownership_Wizard.ActiveStep.Name & " -- " & gr_Party_Owners.Items(0).Cells(4).Value) Else MsgBox(Ownership_Wizard.ActiveStep.Name & " -- " & gr_Party_Owners.Items.Count) End If End Sub
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi Scott,
Thanks for posting in the forum. This behavior is by design. For performance reason, the Grid stores its data along with the Grid, not in the ViewState. This means if the Grid is not visible, its data is no longer rendered. The easiest workaround for this problem is to keep the Grid always rendered. You can do this by: 1. Take the Grid outside of the Wizard control and place it into a separate Panel control; 2. Absolute/relative positioning the Panel so that it "appears" inside the Wizard; 3. Switch the Panel's "display" CSS attribute between "block" and "none" to show/hide the Panel when the active wizard page changes. Note you can not use the Panel's Visible property here;
Another workaround is to always store the data in memory, not in the Grid. When user leaves the page with the Grid, you would update your data in memory according to the Grid, for all other cases, load the Grid with data in your memory.
Hope this helps.
Thanks!
|