This is a migrated thread and some comments may be shown as answers.

Embedded Controls Behave Improperly

3 Answers 37 Views
Wizard
This is a migrated thread and some comments may be shown as answers.
Thanos
Top achievements
Rank 1
Thanos asked on 25 Aug 2016, 01:40 PM

Hello,

I have a Wizard that has 3 pages. Each page has a ListBox with items for the user to select.

My problem is that when the user makes the selections on the first page's Listbox then clicks "Next" to go to page 2, the first page's ListBox's SelectedItems collection becomes empty (instead of being populated with the items the user selected on the first page). However, when I go back to page 1, the ListBox's SelectedItems collection now contains what the user selected.

Does the Wizard do something behind the scenes to the contents of the pages? (Perhaps to conserve memory, etc.) If so, is there a way to disable this?

Thanks,
-Thanos

3 Answers, 1 is accepted

Sort by
0
Accepted
Yoan
Telerik team
answered on 26 Aug 2016, 01:56 PM
Hi Thanos,

By default, RadWizard reuses a single ContentPresenter for holding the currently selected page. Each time the selection is changed, the content of the last active page is unloaded in order to load the content of the newly selected page, thus the content of the pages is not persisted. In order to save the content of each page, you need to set Wizard's IsContentPreserved property to "True".

Regards,
Yoan
Telerik by Progress
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
Thanos
Top achievements
Rank 1
answered on 15 Sep 2016, 04:08 PM

Hey Yoan,

That worked great, thanks!

Just out of curiosity, why is preserving the content not the default? Seems a little unintuitive for the control to do this optimization without the user telling it to.

Take care,
-Thanos

0
Accepted
Yoan
Telerik team
answered on 20 Sep 2016, 02:37 PM
Hi Thanos,

RadWizard was released without preserving its content and this was by design. Later, after clients demand, we had introduced the IsContentPreserved property.

Regards,
Yoan
Telerik by Progress
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Tags
Wizard
Asked by
Thanos
Top achievements
Rank 1
Answers by
Yoan
Telerik team
Thanos
Top achievements
Rank 1
Share this question
or