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

Using winforms pageview in outlook mode to open another pageview tab

3 Answers 135 Views
PageView
This is a migrated thread and some comments may be shown as answers.
Zachary
Top achievements
Rank 1
Zachary asked on 23 Nov 2011, 02:44 PM
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.

3 Answers, 1 is accepted

Sort by
0
Ivan Petrov
Telerik team
answered on 28 Nov 2011, 11:11 AM
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.

0
Zachary
Top achievements
Rank 1
answered on 28 Nov 2011, 04:59 PM
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.
0
Ivan Petrov
Telerik team
answered on 01 Dec 2011, 05:07 PM
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.

Tags
PageView
Asked by
Zachary
Top achievements
Rank 1
Answers by
Ivan Petrov
Telerik team
Zachary
Top achievements
Rank 1
Share this question
or