Programmatically select a PageView page

4 posts, 0 answers
  1. Claude
    Claude avatar
    63 posts
    Member since:
    Apr 2009

    Posted 15 Sep 2010 Link to this post

    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.
  2. Claude
    Claude avatar
    63 posts
    Member since:
    Apr 2009

    Posted 16 Sep 2010 Link to this post

    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.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Emanuel Varga
    Emanuel Varga avatar
    1336 posts
    Member since:
    May 2010

    Posted 21 Sep 2010 Link to this post

    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
  5. Alexander
    Admin
    Alexander avatar
    306 posts

    Posted 23 Sep 2010 Link to this post

    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
Back to Top