Select pages via page Index

6 posts, 1 answers
  1. Alan
    Alan avatar
    14 posts
    Member since:
    Jan 2007

    Posted 21 Mar 2011 Link to this post

    How do I select pages in a Pageview with the page index integer?
  2. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 21 Mar 2011 Link to this post

    Hello Alan,

    The way to select RadPageViewPages is not by index but by specifying the page itself. For example

    this.radPageView1.SelectedPage = this.radPageViewPage1

    Hope that helps, but please let me know if you need more information
    RIchard
  3. Alan
    Alan avatar
    14 posts
    Member since:
    Jan 2007

    Posted 21 Mar 2011 Link to this post

    Richard,

    I know how to do this, but it doesn't really help.

    Problem:
    1. How do I recursively go through 20 pages and set text, visibility?

    2. What if I rename pages based on other parameters.  
    For example 
    say I change radPageViewPage1 to radPageViewPageResults94952 based on a query result,
    or what if I name the pages
    radPage199, radpage22, radpageElephant.  

    How do I reference the 2nd page?  

    Do I now have to track changes I make to page names in order to reference them again?

    Why is there no ability to reference controls based on their Index?  Seems like a basic function.

    If we can't reference a page by the index why do we have the ability to get the page index
    intPageSelected = Me.radPageView.Pages.IndexOf(radPageView.SelectedPage) 

    Hope you can help.

    Alan
  4. Answer
    Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 22 Mar 2011 Link to this post

    Hello Alan,

    Another 2 ways to select a page would be as follows:

    Me.RadPageView1.SelectedPage = Me.RadPageView1.Pages(1) ' Index
    Me.RadPageView1.SelectedPage = Me.RadPageView1.Pages("RadPageViewPage2") 'Name

    Hope that helps
    Richard
  5. Alan
    Alan avatar
    14 posts
    Member since:
    Jan 2007

    Posted 22 Mar 2011 Link to this post

    exactly what I needed.

    Thanks

    Alan
  6. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 22 Mar 2011 Link to this post

    You're welcome. Please remember to mark as answer
    Thanks
    Richard
Back to Top