PageView Index Property

9 posts, 3 answers
  1. meraj
    meraj avatar
    47 posts
    Member since:
    Dec 2010

    Posted 27 Jan 2011 Link to this post

    is there index property like selectedIndex in pageview view mode strip.
    so that i can select page like panelBar.SelectedIndex=1 
  2. Answer
    Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 27 Jan 2011 Link to this post

    Hi Meraj,

    The way to select a page is using the SelectedPage property

    RadPageViewPage1.Text = "My Page 1"
    RadPageViewPage2.Text = "My Page 2"
    RadPageViewPage3.Text = "My Page 3"
    RadPageViewPage4.Text = "My Page 4"
    Me.RadPageView1.ViewMode = PageViewMode.Strip
    Me.RadPageView1.SelectedPage = RadPageViewPage3

    Hope that helps
    Richard
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 28 Jan 2011 Link to this post

    Hello Meraj,

    Please remember to mark as answer if this helped. If you need more information, just let me know
    Thanks
    Richard
  5. meraj
    meraj avatar
    47 posts
    Member since:
    Dec 2010

    Posted 29 Jan 2011 Link to this post

    Thanx for your help its working fine,But I want to know  about index property of PageView view mode Strip
  6. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 29 Jan 2011 Link to this post

    Hello Meraj,

    As far as I'm aware, there is no index property that you can reference. The RadPageView simply contains a RadPageViewPageCollection. You would need to itterate through the pages to get an "index", finding the page that you want.

    Regards,
    Richard

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

    Posted 29 Jan 2011 Link to this post

    Meraj,

    I should have mentioned though, like other collections, you have access to indexof, E.g.

    Me.RadPageView1.Pages.IndexOf(Me.RadPageViewPage2)

    Which will give you the index of RadPageViewPage2
    Richard
  8. meraj
    meraj avatar
    47 posts
    Member since:
    Dec 2010

    Posted 30 Jan 2011 Link to this post

    Thanx for help Richard.
  9. subbarayan
    subbarayan avatar
    20 posts
    Member since:
    Oct 2008

    Posted 04 Feb 2011 Link to this post

    hi
       I want to set visibility false/collapsed of a page when another page is set to select in radpageview. help me.
  10. Answer
    Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 04 Feb 2011 Link to this post

    Hello,

    You could do this via the PropertyChanged event of the RadPageViewPage.
    For exmaple. Set set RadPageViewPage2 to collapsed when you select RadPageViewPage1

    AddHandler RadPageViewPage1.Item.PropertyChanged, AddressOf PageViewPage1_PropertyChanged

    Private Sub PageViewPage1_PropertyChanged(ByVal sender As Object, ByVal e As PropertyChangedEventArgs)
        If e.PropertyName.ToUpperInvariant() = "ISSELECTED" Then
            Me.RadPageViewPage2.Item.Visibility = ElementVisibility.Collapsed
        End If
    End Sub

    Hope that helps
    Richard
Back to Top
UI for WinForms is Visual Studio 2017 Ready