Using winforms pageview in outlook mode to open another pageview tab

4 posts, 0 answers
  1. Zachary
    Zachary avatar
    2 posts
    Member since:
    Nov 2011

    Posted 23 Nov 2011 Link to this post

    Im having issues with the page view. I want to us the outlook view and next to the frist page view i have another one wich i wanted to use the tabs. What I m trying to do is when i click on one of the buttons in the outlook page view i want it to open one of the tabs in the other page view. Any Help would be Great.

  2. Ivan Petrov
    Admin
    Ivan Petrov avatar
    692 posts
    Member since:
    Sep 2012

    Posted 28 Nov 2011 Link to this post

    Hi Zachary,

    Thank you for writing.

    I have attached a sample project where I have tried to reproduce your scenario. All I did is handle the outlook page view SelectedPageChanged event and set the SelectedPage property of the strip page view to a page. If this is not what you want, I would kindly ask you to send me a more detailed explanation of what you are trying to achieve.

    I hope this will help you. Should you need further assistance, I would be glad to provide it.

    Best wishes,
    Ivan Petrov
    the Telerik team

    Q3’11 of RadControls for WinForms is available for download (see what's new). Get it today.

  3. DevCraft Release
  4. Zachary
    Zachary avatar
    2 posts
    Member since:
    Nov 2011

    Posted 28 Nov 2011 Link to this post

    thank you for the response. I should have stated that we are using vb.net for this. I converted what you had and i get and error about the equal sign.

    my code
                    Public Partial Class Form1
                                    Inherits RadForm
                                    Public Sub New()
                                                    InitializeComponent()
                                    End Sub

                                    Private Sub radPageView1_SelectedPageChanged(sender As Object, e As EventArgs)
                                                    If Me.radPageView1.SelectedPage = Me.radPageViewPage1 Then
                                                                    Me.radPageView2.SelectedPage = Me.radPageViewPage6
                                                    End If
                                                    If Me.radPageView1.SelectedPage = Me.radPageViewPage2 Then
                                                                    Me.radPageView2.SelectedPage = Me.radPageViewPage7
                                                    End If
                                                    If Me.radPageView1.SelectedPage = Me.radPageViewPage3 Then
                                                                    Me.radPageView2.SelectedPage = Me.radPageViewPage8
                                                    End If
                                    End Sub

                                    Private Sub Form1_Load(sender As Object, e As EventArgs)

                                    End Sub
                    End Class

    i tried with it in its own namespace but still the same issue. the error i get is:

    Operator '=' is not defined for types 'Telerik.WinControls.UI.RadPageViewPage' and 'Telerik.WinControls.UI.RadPageViewPage'.


    any help would be great.

  5. Ivan Petrov
    Admin
    Ivan Petrov avatar
    692 posts
    Member since:
    Sep 2012

    Posted 01 Dec 2011 Link to this post

    Hello Zachary,

    Thank you for your reply.

    I converted the example also and tested it. The reason for the exception is that when you start the project, the first page view is created, its pages are added and its SelectedPage property is set. This setting fires the event and it tries to set the SelectedPage of the second page view, but this page view has not been initialized yet and its pages have not been added to its pages collection. To work around this, please subscribe to the event after the form components have been initialized. This means after the call to the InitializeComponenets method in the form constructor.

    I hope this will be useful for you. If you have further questions, I would be glad to help.

    Best wishes,
    Ivan Petrov
    the Telerik team

    Q3’11 of RadControls for WinForms is available for download (see what's new). Get it today.

Back to Top