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

Programmatically select a PageView page

3 Answers 990 Views
PageView
This is a migrated thread and some comments may be shown as answers.
Claude
Top achievements
Rank 1
Claude asked on 16 Sep 2010, 04:48 AM
I am migrating my code from using RadPanelBar to using RadPageView.  In my code, I was able to select a given Panel by setting a boolean:

myRadPanelBarGroupElement.Expanded = true;

What is the equivalent call for a RadPageView page?  I scrolled through all commands, and tried a few, and nothing worked.  I admit I didn't try them all, though.

Any advice will be appreciated.

3 Answers, 1 is accepted

Sort by
1
Claude
Top achievements
Rank 1
answered on 17 Sep 2010, 01:52 AM
Never mind.  All you do is access the member variable "SelectedPage" in the parent.

myRadPageView.SelectedPage = myRadPageViewPage;

where myRadPageViewPage is a given page created in myRadPageView.
0
Emanuel Varga
Top achievements
Rank 1
answered on 21 Sep 2010, 06:47 AM
Hello Claude,

I want to start with saying that I'm glad you found the answer by yourself, but sadly, currently the page view does not support setting the selected page directly from the child item like the tab bar or like in your example the panel bar did, but if you have more than one pageview in a form sometimes it's better to just use the parent property from the page itself to set the child, something like

((Telerik.WinControls.UI.RadPageView)radPageViewPage1.Parent).SelectedPage = radPageViewPage1;

Best Regards,
Emanuel Varga
0
Alexander
Telerik team
answered on 23 Sep 2010, 05:10 PM
Hello guys,

Your conclusion is correct. You can select a RadPageViewPage setting the SelectedPage property of the RadPageView control.

Regards,
Alexander
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
PageView
Asked by
Claude
Top achievements
Rank 1
Answers by
Claude
Top achievements
Rank 1
Emanuel Varga
Top achievements
Rank 1
Alexander
Telerik team
Share this question
or